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

Detailed explanation of the use of Vue image drag and drop zoom component

The specific usage of the Vue image drag and drop...

js realizes the image cutting function

This article example shares the specific code of ...

Delegating Privileges in Linux Using Sudo

Introduction to sudo authority delegation su swit...

Sharing tips on using Frameset to center the widescreen

Copy code The code is as follows: <frameset co...

How to declare a cursor in mysql

How to declare a cursor in mysql: 1. Declare vari...

Example of cross-database query in MySQL

Preface In MySQL, cross-database queries are main...

MySQL quickly inserts 100 million test data

Table of contents 1. Create a table 1.1 Create te...

Detailed explanation of Angular routing basics

Table of contents 1. Routing related objects 2. L...

How to draw a vertical line between two div tags in HTML

Recently, when I was drawing an interface, I enco...

Detailed explanation of JavaScript's built-in Date object

Table of contents Date Object Creating a Date Obj...

Complete steps for Nginx to configure anti-hotlinking

need: Usually, sites want to prevent videos and p...

Solution to VMware virtual machine no network

Table of contents 1. Problem Description 2. Probl...