Objective
Hello everyone! This series of articles is written according to Atzie's own process of making this site. Atzie has not made a website that really meets the Web standards. Now while the reference to foreign data production, at the same time the process of learning and experience recorded down, I hope to help you a bit. All right, let's get started.
First day
The first thing to do when you start making a site that meets the standard is to declare a DOCTYPE that meets your needs.
View the original home code, you can see the first line is:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Open some of the standard sites, such as the famous web design software developer Macromedia, Design Master Zeldman's personal website, will find the same code. The code for other standards-compliant sites, such as K10k.net, is as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 frameset//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >
So what does the code mean? Are you sure you want to place it?
What is DOCTYPE
The above code we call the DOCTYPE declaration. DOCTYPE is a shorthand for document type, which is used to indicate what version of XHTML or HTML you are using.
The DTD (for example, the XHTML1-TRANSITIONAL.DTD in the example above) is called the document type definition, which contains the rules of the document, and the browser interprets the identity of your page based on the DTD you define and displays it.
To create a standard Web page, the DOCTYPE declaration is an essential part of the key; unless your XHTML determines a correct DOCTYPE, your logo and CSS will not work.