In addition to setting regulations for various tags, W3C also provides a verification function that allows web page creators to check whether they are actually following W3C regulations. Preface In addition to setting various tag regulations, W3C also provides a verification function to allow web page creators to check whether they are in accordance with W3C regulations. How to achieve W3C XHTML1.0 standard web pages <br />Currently, XHTML1.0 and HTML4.01 are the most commonly used. Since XHTML1.0 evolved from HTML4.01, it is almost a revised version of HTML4.01. From a strict perspective, XHTML1.0 is more stringent. Although the rules of XHTML1.0 and HTML4.01 are very similar, since XHTML1.0 is a revised version of the latter, the regulations of the former are of course stricter than HTML4.01. More likely to make mistakes 1. All tags must be lowercase. Error: <HTML> <Title> <BODY> <FonT> Correct: <html> <title> <body> <font> 2. All attributes in the tag must have a value 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, you must repeat the attribute as a value, such as: Error: <frame noresize> Correct: <frame noresize="noresize"> 3. All labels must be in pairs. If not, add / at the end. Wrong: <li>Mickey<li>Minnie<li>Pluto Correct: <li>Mickey</li><li>Minnie</li><li>Pluto</li> Error:<br> Correct:<br /> 4. The minimum tags a web page should contain <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5" /> <title>Title</title> </head> <body> content </body> </html> Note: Chinese web pages are usually encoded in big5, so you need to add the following line between <head> and </head>: <meta http-equiv="Content-Type" content="text/html; charset=big5" /> 5. If you want to display [<][>][&], you need to enter other values. For example, if you want to display < > on the web page, you need to fill in: < > If you want to display & in a web page, it will be an error: & Correct: & 6. The order of labels cannot be mixed up. Error: <b><p>Text</b></p> Correct: <b><p>Text</p></b> 7. Comments cannot contain---- Error: <!--Mickey is just---too cute--> Correct: <!--Mickey is so cute--> 8. The image label must contain annotation text. The annotation text is the text that appears when you move the mouse pointer over the image: Error: <img src="mickey.jpg"> Correct: <img src="mickey.jpg" alt="This is a picture of Mickey" /> 8. XHTML1.0 document header is added to the first line of a normal web page: <!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"> verify W3C provides web page or upload verification. If you enter the URL and fail, a red warning will appear and tell you where the error is. Then you can modify it slowly according to the error. W3C standard validation web page: http://validator.w3.org/ Postscript <br />Speaking of this, have you tried to paste other people's URLs to verify it? Because most web pages are made for IE users, they will almost never pass the W3C. As long as IE can display it normally, it will be fine. If you have tried to paste any page of my web page, it should pass the verification. Take the teacher's teaching web page as an example. Except for the homepage, most of them will not pass. The 39th line of the left page menu is not enclosed in double quotes: Error: aux1 = insFld(foldersTree, gFld("<font color=blue>中文</font>输入")) Correct: aux1 = insFld(foldersTree, gFld("<font color="blue">Chinese</font> input")) Basic web design - 01 Understanding HTML image tags without annotations (the most common mistake No. 8) Do you really need to comply with W3C regulations? Complying with W3C regulations will allow your web pages to look the same when viewed with any browser. For example, if someone is making a web page for IE, the design may be different from the original when browsing with Firefox. So, try to comply with W3C regulations! |
<<: JavaScript removes unnecessary properties of an object
>>: idea combines docker to realize image packaging and one-click deployment
1. Enter the Docker official website First, go to...
These introduced HTML tags do not necessarily ful...
This article describes how to boot the Linux syst...
1. Paradigm The English name of the paradigm is N...
Problem Description In the recent background serv...
My97DatePicker is a very flexible and easy-to-use...
background Ever wondered how to create a shadow e...
Table of contents Tomcat Download Tutorial Tomcat...
Table of contents 1. Communication between father...
In fact, this is very simple. We add an a tag to ...
Generally, on national days of mourning, days of ...
This article example shares the specific code of ...
Table of contents mysql permission control Permis...
This article uses examples to illustrate the simp...
vmware workstations starts the virtual machine er...