Home > Web Front-end > HTML Tutorial > Simply master the usage of horizontal line annotations and code comments in HTML_HTML/Xhtml_Web page production

Simply master the usage of horizontal line annotations and code comments in HTML_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:36:12
Original
2408 people have browsed it

Horizontal Line
Use the


tag to draw a horizontal dividing line at the current location.
Example:

XML/HTML CodeCopy content to clipboard
  1. <p>Main contentp >
  2. <hr />
  3. <p>Bottom contentp> 

Horizontal lines can effectively isolate different content parts and give people a sense of hierarchy.
Tips:
Since the borders of DIV or other block elements can be formatted and displayed through CSS, many times the width of the border of the block element is set to achieve the effect of a horizontal line, but < The hr /> tag still cannot be completely replaced.

HTML Comment
The XHTML comment tag is a special tag. As the name suggests, it is used to comment on the content in the XHTML document. Of course, it will not be displayed in the browser. come out. The comment tags are as follows:

XML/HTML CodeCopy content to clipboard
  1. >
  2. An example:
  3. <div id="nav" >

Note:
There is an exclamation mark after the opening left bracket. In addition, do not write comments in other languages ​​such as "//" or "/*".
Tips:
It is a good habit to add comments appropriately and can be used wherever you want to comment so that the HTML documents we write are easy to read and maintain.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template