How to learn web standards
Many forum members of the web standardization version of the classic forum ask this question. I think everyone who is new to web standards will ask this question. I will summarize it based on my own experience.
Step 1. Don’t just use DW and other tools to design web pages, get familiar with (X)HTML language and CSS language
Because web standards have improved code requirements, it is impossible to pass the inspection without a certain understanding of xhtml code. DW tools can also be used, but you have to look at the code to write the web page.
The first is the xhtml code, there are not many, know how to use them, how to write them correctly, and remember to close the tag. Such as <img/><br/>. It is recommended to read some html reference manuals. After all, xhtml is upgraded from html, and many tags are still in use.
Step 2. Create a standardized declaration (DOCTYPE) and head
<!–(1) Transitional (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)Frameset–>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<!–Set a namespace (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–>
<!–Allow search robots to search all links on the site. If you want certain pages not to be searched, it is recommended to use the robots.txt method–>
<meta content=”all” name=”robots” />
<!–Set site author information–>
<meta name=”author” content=”[email protected] ,阿杰” />
<!–Set site copyright information–>
<meta name=”Copyright” content=”www.w3cn.org, free copyright, any reproduction” />
<!–A brief introduction to the site (recommended)–>
<meta name="description" content="New web designer. Web standards tutorial site, promoting the application of web standards in China" />
<!–Keywords of the site (recommended)–>
<meta content=”designing, with, web, standards, xhtml, css, graphic, design, layout, usability, ccessibility, w3c, w3, w3cn, ajie” name=”keywords” />
<!–Favorite icon–>
<link rel=”icon” href=”/favicon.ico” type=”image/x-icon” />
<link rel=”shortcut icon” href=”/favicon.ico” type=”image/x-icon” />
<title>Webpage title</title>
<!–Connect style sheet–>
<link rel=”stylesheet” rev=”stylesheet” href=”css/style.css” type=”text/css” media=”all” />
<style type=”text/css” media=”all”>@import url( css/style01.css );</style>
<!–RSS–>
<link rel=”alternate” type=”application/rss+xml” title=”greengnn’s space” href=”http://www.jluvip.com/blog/feed.asp” />
<!–JS–>
<script src=”js/common.js” type=”text/javascript” language=”javascript” "></script>
</head>
<body></body>
</html>
Step 3. Learn how to use div with CSS for web page layout
Use <div> with CSS to layout your web page instead of using table. There are many such articles and examples. I recommend you go to bluediea.com. There are many benefits of div layout. Here are a few practical ones:
1. The code has little redundancy and the webpage opens quickly.
2. Structure and performance are separated. You can change your layout only through CSS, while the information remains unchanged. This reduces the cost of maintenance and upgrades.
Step 4. Learn web standard theory, semantics, CSS, and the idea of separation of structure and presentation
The web standards are actually proposed just to achieve the semantics of tags, the separation of structure and performance, the transition from website localization to internationalization, backward compatibility and device independence, so that your web pages can run smoothly on the Internet.
At this stage, you can already use CSS to layout your web pages and create web pages that can pass W3C inspection. You can understand what web standards are, the framework and functions of web standards, the ideas and advantages of separation of structure and performance, and the deeper knowledge of CSS. The theory of layers, the semantics of xhtml tags, affinity theory, and cross-platform functionality make your web pages suitable for multiple browsers and devices.
Step 5. Apply web standards to create web pages, establish your own web standard code specifications, and improve development efficiency.