In addition to setting up the specifications of each tag, W3C also provides verification functions to allow web page producers to check whether they are actually in accordance with W3C regulations.
PrefaceIn addition to setting up the specifications of each label, W3C also provides verification functions to allow web page producers to check whether they are actually in accordance with W3C regulations.
How to achieve W3C XHTML1.0 standard web pageCurrently, the most commonly used ones are mainly XHTML1.0 and HTML4.01
Since XHTML1.0 evolved from HTML4.01, it is almost a revised version of HTML4.01
From a strict perspective, XHTML1.0 is considered more stringent
Although the rules of XHTML1.0 and HTML4.01 are very similar, since XHTML1.0 is a revised version of the latter
Of course, the former regulations will be stricter than HTML4.01.
More likely to occur errors 1. All labels must be lowercaseError: <HTML> <Title> <BODY> <FonT>
Correct: <html> <title> <body> <font>
2. All attributes in the volume label must have values and double or single quotes cannot be omitted.
Error: <a href=index.htm>link</a>
Correct: <a href=index.htm>link</a>
If there is no attribute value, the attribute must be repeated as the value, such as:
Error: <frame noresize>
Correct: <frame noresize=noresize>
3. All tags must be paired, if not paired, you must add/at the end
Error: <li>Mickey<li>Mini<li>Bruto
Correct: <li>Mickey</li><li>Mini</li><li>Bruto</li>
Error: <br>
Correct:<br />
4. The minimum tag to include on a web page
<html>
<head>
<meta http-equiv=Content-Type content=text/html; charset=big5 />
<title>Title</title>
</head>
<body>
content
</body>
</html>
Note: Usually, Chinese web pages are encoded with big5, and the following lines must be added between <head> and </head>:
<meta http-equiv=Content-Type content=text/html; charset=big5 />
5. If you want to display [<】【>】【&】, you need to enter it in other values.
For example, if you want to display < > on a web page, you need to fill in:
< >
If you want to display & on the web page
mistake:&
Correct:&
6. The order of the volume labels must not be confused
Error: <b><p>Text</b></p>
Correct: <b><p>Text</p></b>
7. The annotation text cannot be included---
Error: <!--Mickey is so cute-->
Correct: <!--Mickey is so cute-->
8. The picture label must contain annotated text
Annotation text is the text that appears when you move the mouse pointer to the picture:
Error: <img src=mickey.jpg>
Correct: <img src=mickey.jpg alt=This picture is Mickey/>
8.XHTML1.0 file header is added to the first line
General web pages:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
Frame page:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Frameset//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd>
verifyW3C provides web pages or upload verification, enter the URL after entering
If it fails, a red warning will appear, and will tell you where there is an error, and then slowly modify it according to the error.
W3C standard verification web page: http://validator.w3.org/
postscriptHaving said that, have you tried to post the URLs of other people to verify?
Because most web pages are made for IE users, they will hardly pass W3C completely, as long as IE can display them normally.
If you have tried to post any page of my web page, it should pass the verification
Take the teacher’s teaching web page as an example, but most of them are not passed except for the home page.
Line 39 of the left page menu is not double quoted:
Error: aux1 = insFld(foldersTree, gFld(<font color=blue>Chinese</font> input))
Correct: aux1 = insFld(foldersTree, gFld(<font color=blue>Chinese</font> input))
Basic web page production-01 Understand that the picture tags in HTML have not been annotated (point 8 of the more likely errors)
In fact, do you really need to comply with W3C regulations? Complying with W3C regulations allows your web page to browse with any browser.
For example, if someone is targeting IE, many different designs may appear when browsing with Firefox.
So, try to comply with W3C regulations!