Don't forget to close the HTML tag

Don't forget to close the HTML tag
Building web pages that comply with Web standards has always been a topic that jb51.net discusses with everyone. Then, did you remember to close all XHTML elements? Some elements in HTML do not need to be closed. When the next element starts, the previous element is automatically closed. XHTML does not allow this. All elements must be closed, even if they have no content (such as <img>). This kind of page editing conforms to web standards.


mistake:
<li>Item 1
correct:
<li>Item 1</li>

mistake:
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
correct:
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>

mistake:
<br>
correct:
<br />

mistake:
<img src="image.jpg" alt="">
correct:
<img src="image.jpg" alt="" />

Wrong practices should be 100% avoided. As always, always keep all your markers closed.

<<:  jQuery uses the canvas tag to draw the verification code

>>:  A summary of detailed insights on how to import CSS

Recommend

Summary of the differences between global objects in nodejs and browsers

In Node.js, a .js file is a complete scope (modul...

Introduction to using MySQL commands to create, delete, and query indexes

MySQL database tables can create, view, rebuild a...

CSS pseudo-class: empty makes me shine (example code)

Anyone who has read my articles recently knows th...

A brief analysis of the basic implementation of Vue detection data changes

Table of contents 1. Object change detection 2. Q...

Linux kernel device driver memory management notes

/********************** * Linux memory management...

Explain how to analyze SQL efficiency

The Explain command is the first recommended comm...

Win10 64-bit MySQL8.0 download and installation tutorial diagram

How do I download MySQL from the official website...

JavaScript and JQuery Framework Basics Tutorial

Table of contents 1. JS Object DOM –1, Function –...

4 ways to modify MySQL root password (summary)

Method 1: Use the SET PASSWORD command First log ...

How to check if a table exists in MySQL and then delete it in batches

1. I searched for a long time on the Internet but...

How to use JavaScript to implement sorting algorithms

Table of contents Bubble Sort Selection Sort Inse...

Overview of the basic components of HTML web pages

<br />The information on web pages is mainly...

How to use yum to configure lnmp environment in CentOS7.6 system

1. Installation version details Server: MariaDB S...