DOCTYPE and HTML

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.