如何制作代码 HTML 有评论的不活跃

我有一个代码 HTML 在页面上,我不想清洗,但我确实在短时间内工作了。 如何让浏览器忽略页面的一部分
//

工作在一些编程语言?
已邀请:

卫东

赞同来自:

这里 HTML 评论:


 comment 


http://www.w3.org/TR/html401/i ... -HTML
当然,在不删除它的情况下删除代码的正确方法是使用对版本的控制,这允许您从过去复活旧代码。 不要习惯在页面上累积评论的代码,这不太有趣。

风见雨下

赞同来自:

HTML 评论

:


 <div> This div will not show </div> 


https://developer.mozilla.org/ ... nting
CSS 评论

:


/* This style will not apply */


https://developer.mozilla.org/en/CSS/Comments
JavaScript 评论

:


// This single line JavaScript code will not execute


OR


/*
The whole block of JavaScript code will not execute
*/


https://developer.mozilla.org/ ... ments

石油百科

赞同来自:

用嵌套评论评论块:替换内部 /堵塞/ 评论S. " -- "在" ++"


 *********************************************************************
* IMPORTANT: To uncomment section
* sub inner comments "++" -> "--" & remove this comment
*********************************************************************
<head>
<title>My document's title</title> <++! My document's title ++>
<link rel=stylesheet href="mydoc.css" type="text/css">
</head>

<body>
<++! My document's important HTML stuff ++>
...
...
...
</body>

*********************************************************************
* IMPORTANT: To uncomment section
* sub inner comments "++" -> "--" & remove this comment
*********************************************************************


因此,最外部评论忽略了一切 "invalid" 国内的 /堵塞/ 评论。

詹大官人

赞同来自:

只需在其周围创建一个多行评论。 当您想返回它时,只需删除注释标记。

例如,
 Stuff to comment out or make inactive 

快网

赞同来自:

利用:


 This is a comment for an HTML page and it will not display in the browser 


有关更多信息,我认为这一点
http://www.w3.org/TR/html4/intro/sgmltut.html
可以帮助你。

董宝中

赞同来自:

如果您正在使用
http://en.wikipedia.org/wiki/E ... %2529
, 那个钥匙的组合

Ctrl

+

Shift

+

/

添加一组代码。 要进行评论字符串或选择代码,请右键单击 ->

来源

- >

添加块评论

.

删除块评论,

Ctrl

+

Shift

+

\

或右键单击 ->

来源

- >

删除块注释

.

小姐请别说爱

赞同来自:

发表评论:

暂时提交物品,而不是删除它们,特别是如果它们仍未完成。

在您的实际文件中写下笔记或提醒自己。 HTML.

为其他脚本语言创建注释,例如 JavaScript, 这需要他们的使用

HTML 评论


 Everything is invisible 

要回复问题请先登录注册