Detailed explanation of the points that need to be paid attention to in HTML standards that comply with W3C standards

Detailed explanation of the points that need to be paid attention to in HTML standards that comply with W3C standards
XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
  2. Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >     
  4. < html   xmlns = "http://www.w3.org/1999/xhtml" >     
  5. < head >     
  6. < meta   http-equiv = "Content-Type"   content = "text/html; charset=utf-8"   />     
  7. < title > HTML standard source code - HTML standard main points to note </ title >     
  8. < meta   name = "keywords"   content = "Keywords"   />     
  9. </ head >     
  10. < body >     
  11. First line < br   />     
  12. Second row
  13. < p > Paragraph 2 </ p >     
  14. < p > Paragraph 3 </ p >     
  15. </ body >     
  16. </ html >      

△Standard HTML conforms to w3c source code

Things to note about HTML standards that comply with W3C standards

1. First, the DOCTYPE declaration

2. If it starts with <html>, it should end with </html>

3. Note that a pair of combined tags such as <title> must end with </title>.

Common combination tags include div, p, title, head, html, table, tr, td, span, style, b, strong, ul, ol, li, dl combination (dl, dt, dd), body

4. Single tags such as line break tags br and other tags should be represented by <br /> tags

Single tags include br, meta, and link

5. For tag names, try to use lowercase letters, such as <div>, and avoid using uppercase letters, such as <DIV>.

According to HTML standards, web standards, and W3C standards, the above points need to be followed to comply with the standards.

How do you know when you need a pair of tags and when you need a single tag? This requires you to pay more attention to it when developing div+css, and you can also use Dreamweaver software to make a simple judgment.

The method to use Dreamweaver to determine the tag is as follows

You can do it by handwriting in the "Code" of Dreamweaver software. Generally, when Dreamweaver software writes a tag ending with ">", if it is a single tag, Dreamweaver software will automatically convert it to "/>", such as "<br />". If it corresponds to a pair of tags, it will not convert the ">" tag and will display the ">" tag instead of changing to "/>". At this time, you need to end the tag with "</" plus the tag name plus ">", such as "<div>" should end with "</div>".

The above detailed explanation of the points that need to be paid attention to in the HTML standard that complies with the W3C standard is all the content that the editor shares with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

<<:  Summary of the application of transition components in Vue projects

>>:  HTML uses form tags to implement the registration page example code

Recommend

Detailed explanation of keepAlive usage in Vue front-end development

Table of contents Preface keep-avlive hook functi...

Sample code for highlighting search keywords in WeChat mini program

1. Introduction When you encounter a requirement ...

MySQL log trigger implementation code

SQL statement DROP TRIGGER IF EXISTS sys_menu_edi...

Do you know how many connections a Linux server can handle?

Preface First, let's see how to identify a TC...

Share 8 MySQL pitfalls that you have to mention

MySQL is easy to install, fast and has rich funct...

Detailed explanation of DOM DIFF algorithm in react application

Table of contents Preface What is VirtualDOM? Rea...

Briefly understand the two common methods of creating files in Linux terminal

We all know that we can use the mkdir command to ...

How to set npm to load packages from multiple package sources at the same time

Table of contents 1. Build local storage 2. Creat...

Detailed examples of the difference between methods watch and computed in Vue.js

Table of contents Preface introduce 1. Mechanism ...

Detailed tutorial on installing MYSQL under WINDOWS

1. Download the installation package -Choose the ...

A very detailed tutorial on installing rocketmq under Docker Desktop

Install Docker Desktop Download address: Docker D...