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

How to set up automatic daily database backup in Linux

This article takes Centos7.6 system and Oracle11g...

mysql5.7 create user authorization delete user revoke authorization

1. Create a user: Order: CREATE USER 'usernam...

Docker mounts local directories and data volume container operations

1. Docker mounts the local directory Docker can s...

What does mysql database do

MySQL is a relational database management system ...

The core process of nodejs processing tcp connection

A few days ago, I exchanged some knowledge about ...

Web designer is a suitable talent

<br />There is no road in the world. When mo...

Vue implements time countdown function

This article example shares the specific code of ...

mysql splits a row of data into multiple rows based on commas

Table of contents Separation effect Command line ...

Solve the problem of blocking positioning DDL in MySQL 5.7

In the previous article "MySQL table structu...

Newbies quickly learn the steps to create website icons

<br />Original URL: http://www.lxdong.com/po...

JavaScript design pattern chain of responsibility pattern

Table of contents Overview Code Implementation Pa...

Detailed explanation of Vue's custom event content distribution

1. This is a bit complicated to understand, I hop...

Ten popular rules for interface design

<br />This is an article I collected a long ...

Native JS realizes uniform motion of various sports

This article shares with you a uniform motion imp...