Many of my contacts asked me how to learn how to create Web pages based on Web standards? I think every person who just came into contact with web standards will ask such a question. I will summarize it based on my own experience.
1. Do not use DW or other tools to design webpages, and familiarize yourself with (X) HTML and CSS languages.
Because web standards have higher requirements for code, you cannot pass the verification without a certain understanding of the xhtml code. The DW tool can also be used, but you have to look at the code to write the webpage.
The first is xhtml code, not many, know how they are used, how to write correctly, and remember to close tags. For example, <br/>. We recommend you read some html reference manuals. After all, xhtml is upgraded from html, and many tags are still in use.
2. Establish a standardized statement (DOCTYPE) and head
The previous web pages and even large portal websites do not even have a declaration, just Recommended statement
<! -- (1) Transitional -->
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<! -- (2) Strict -->
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<! -- (3) framework -->
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Frameset // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<! -- Set a Namespace lang = "zh-CN"/-->
<Html xmlns = "http://www.w3.org/1999/xhtml" lang = "zh-CN">
<Head>
<! -- Declare your encoding language: GB2312/UTF-8/Unicode/ISO-8859-1 -->
<Meta http-equiv = "Content-Type" content = "text/html; charset = GB2312"/>
<Meta http-equiv = "Content-Language" content = "zh-CN"/>
<! -- Content prepared for search engines -->
<! -- Allows a robot to search all links in a site. If you want some pages not to be searched, the robots.txt method is recommended -->
<Meta content = "all" name = "robots"/>
<! -- Set the site author INFORMATION -->
<Meta name = "author" content = "tslxg@hotmail.com, Lightning"/>
<! -- Set site copyright information -->
<Meta name = "Copyright" content = ", Copyright"/>
<! -- Brief introduction to the site (recommended) -->