Simply master the use of horizontal line annotations and code comments in HTML

Simply master the use of horizontal line annotations and code comments in HTML

Horizontal Line
Use the <hr /> tag to draw a horizontal dividing line at the current position.
example:

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

Horizontal lines can effectively isolate different content parts and give people a sense of hierarchy.
hint:
Since CSS can be used to format the borders of DIV or other block elements, the horizontal line effect is often achieved by setting the width of the borders of block elements. However, the <hr /> tag cannot be completely replaced.

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

XML/HTML CodeCopy content to clipboard
  1. <!—Write your comments here-- >   
  2. An example:
  3. < div   id = "nav" > <!--nav start-->   

Notice:
There is an exclamation mark after the opening left bracket. Also, do not write comments in other languages ​​such as “//” or “/*”.
hint:
It is a good habit to add comments appropriately. You can use them wherever you want to comment, so that the HTML documents we write are easy to read and maintain.

<<:  Implementation of vue-nuxt login authentication

>>:  Solution to the system abnormality (unable to boot) caused by upgrading glibc in Centos7

Recommend

Examples of correct use of interface and type methods in TypeScript

Table of contents Preface interface type Appendix...

Detailed explanation of Linux commands sort, uniq, tr tools

Sort Tool The Linux sort command is used to sort ...

Specific example of MySQL multi-table query

1. Use the SELECT clause to query multiple tables...

Take you to understand MySQL character set settings in 5 minutes

Table of contents 1. Content Overview 2. Concepts...

MySQL 5.7.18 MSI Installation Graphics Tutorial

This article shares the MySQL 5.7.18 MSI installa...

Sample code of uniapp vue and nvue carousel components

The vue part is as follows: <template> <...

Detailed explanation of the WeChat applet request pre-processing method

question Because some of our pages request data i...

Vue complete code to implement single sign-on control

Here is a Vue single sign-on demo for your refere...

How to use async and await in JS

Table of contents 1. async 2. await: 3. Comprehen...

Several reasons for not compressing HTML

The reason is simple: In HTML documents, multiple ...

Summary of some points to note when registering Tomcat as a service

Here are some points to note when registering Tom...

Element-ui's built-in two remote search (fuzzy query) usage explanation

Problem Description There is a type of query call...