博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
html怎么注释掉代码_HTML注释:如何注释掉您HTML代码
阅读量:2519 次
发布时间:2019-05-11

本文共 2085 字,大约阅读时间需要 6 分钟。

html怎么注释掉代码

HTML中的注释 (Comments in HTML)

The comment tag is an element used to leave notes, mostly related to the project or the website. This tag is frequently used to explain something in the code or leave some recommendations about the project. The comment tag also makes it easier for the developer to come back and understand the code he’s written at a later stage. Comments can also used for commenting out lines of code for debugging purposes.

comment标签是用于留下笔记的元素,主要与项目或网站有关。 该标签通常用于解释代码中的某些内容或对项目提出一些建议。 comment标签还使开发人员可以更轻松地返回并了解他在稍后阶段编写的代码。 注释还可以用于注释掉代码行以进行调试。

It is good practice to add comments to your code, especially when working with a team or at a company.

最好在代码中添加注释,特别是在与团队或公司合作时。

Comments are started with <!-- and ended with -->, and can span multiple lines. They can contain code or text, and won’t appear on the front-end of the website when a user visits a page. You can view comments through the Inspector Console, or by viewing Page Source.

注释以<!--开头,以-->结尾,并且可以跨越多行。 它们可以包含代码或文本,并且当用户访问页面时不会出现在网站的前端。 您可以通过Inspector控制台或通过查看页面源来查看注释。

(Example)

Read more: https://html.com/tags/comment-tag/#ixzz4vtZHu5uR

FreeCodeCamp web

FreeCodeCamp is an open-source project that needs your help

有条件的评论 (Conditional Comments)

Conditional Comments defines some HTML tags to be excuted when a certain codition is fullfilled.

条件注释定义了一些HTML标记,当某个条件完成时,这些标记将被执行。

Conditional Comments are only recognised by Internet Explorer Version 5 through to Version 9 - IE5 - IE9.

Internet Explorer版本5到版本9-IE5-IE9仅可识别条件注释。

(Example)

			

IE条件注释 (IE Conditional Comments)

These comments are only available in Internet Explorer and can be used up to IE9. In the current times, there is a good change you will never see them, but it is good to know about their existance. Conditional comments are a way to serve a different experience for different client browsers. For example:

这些注释仅在Internet Explorer中可用,并且最多可用于IE9。 当前,有一个很好的变化,您将永远不会看到它们,但是很高兴知道它们的存在。 条件注释是一种为不同的客户端浏览器提供不同体验的方法。 例如:

有关HTML的更多信息: (More info on HTML:)

翻译自:

html怎么注释掉代码

转载地址:http://kmrwd.baihongyu.com/

你可能感兴趣的文章
IP地址
查看>>
C#弹出对话框
查看>>
love~LBJ,奥布莱恩神杯3
查看>>
oracle 分析函数——ration_to_report 求占有率(百分比)
查看>>
面试常见
查看>>
jquery easyui+ashx+三层框架实现增删改查
查看>>
fopen,fread和fwrite
查看>>
爱的十个秘密--9.承诺的力量
查看>>
【吵架不能吵半截】
查看>>
电子书下载:Silverlight 4: Problem – Design – Solution
查看>>
为Vmware硬盘减肥瘦身
查看>>
YTT的提问以及由此引出的未来规划之思考
查看>>
QTP8.2--安装流程
查看>>
一步一步点亮Led
查看>>
POJ 3630 Phone List [Trie]
查看>>
springmvc 可以设置 <welcome-file>test.do</welcome-file>
查看>>
多Form界面控件状态变化问题分析
查看>>
面试记-(1)
查看>>
压力测试 相关
查看>>
MyBatis 通过 BATCH 批量提交
查看>>