XHTML+CSS basic Knowledge (i): basic knowledge

Source: Internet
Author: User

1. What is the standard?

The standard is not a certain standard, but a collection of some column standards.

It consists of three main aspects: Structure standard (XHTML, XML), Performance Standard (CSS), Action Standard (JAVASCRIPT).

It is intended to be able to achieve a complete separation of structure and performance on a Web page. It requires that the structure of the Web page conform to the XHTML specification.

What does the 2.XHTML specification contain?

document Aspect: document type (DTD) and namespace must be defined

Where namespaces are a specification in the XML language and have little practical significance, the namespaces here are primarily used to label the author of the document type, the standard committee.

label aspect: all labels are lowercase, closed, reasonably nested, ID cannot be duplicated

The tag attribute must have a value, the attribute value must be double-quoted and cannot be empty

Image must be added ALT attribute (easy search engine crawl)

Table labels are not allowed to use the Height property, but you can use the Width property (the height of the table is summed up by the height of each cell, and each browser resolves differently if the label height is easily a compatibility problem)

Prohibit the use of <embed><iframe> tags (these two tags are specified by the browser manufacturer and are not part of the scope of the standard, so they are not recognized by the standard)

Link is not allowed to use the target attribute (strict specification)

content Model:body, form, blockquote can only contain block elements (strict type specification)

Inline elements such as text, images, links, etc. are not allowed to be exposed directly to the body, and must be contained by a block element such as <p> or <div> (Strict specification)

Inline elements cannot contain block elements (strict specification)

Other aspects: prohibit the use of "------" in comments (the browser is different from parsing the end of the comment, prone to problems)

All special symbols are represented by codes (that is, entities in the ordinary sense)

3. What are the relationships between the various structural languages (HTML, XHTML, XML)?

In order to make the Web page specification more rigorous, the world standard decision to abandon the HTML and forcing Web developers to tag Web pages with XML, but the powerful, rigorous style of XML, the content of a complex, want to do this country is obviously not easy, so the specification introduced XHTML as a transition to ease the pain on the road ahead.

XHTML 1.0 Transitional contains all the tags and attributes in HTML4.01 transitional, but requires developers to write HTML code in a more rigorous style.

The difference between XHTML 1.0 Strict and XHTML 1.0 Transitional is that it enforces a more visible separation between the document structure and presentation, and that strict types force developers to use cascading style sheets to control the appearance of the page and not over-type.

is 4.div+css accurate?

This term only exists in China, the intention is to tell everyone xhtml+css and the past Use table layout page The biggest difference, but many people mistakenly think that the page made with DIV+CSS is standard page, this is wrong.

The true standard page refers to a page that conforms to the specifications of the website, and not all of the labels are replaced by the Div page is standard, and the Web-based verification refers to whether the page is compliant with the specifications to verify.

To get rid of the misunderstanding of the label, what label to use when it should be used, and to return to the semantic when the page effect is reached.

5. What are the advantages of the standard page?

less code, clear structure: page loading speed, bandwidth requirements reduced, cost reduction, more conducive to search engine crawl

better compatibility and extensibility: accessed by more users, accessed by a wider range of devices

page Flexibility: The revision is convenient, no need to change the content of the page; less code and components, easy to maintain; flexible control of page display order

XHTML+CSS basic Knowledge (i): basic knowledge

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.