<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
On the login page today, the two login pages are almost identical. Only the text of the connection section is different. After completing the online test, one connection to the hover is effective, and the other is ineffective. (In IE, FF is normal, but again it shows that IE is weak, and the advantage is that it exercises the writing standardization of front-end personnel.) I will check hover, what pseudo classes, what IE6 does not recognize this, however, a page has an effect. None. This indicates that it has nothing to do with CSS. It may only be found in HTML. It takes a day. I decided to find the end from the beginning. first glance, the problem is that an HTML file has a doctype file to declare a file. The reason is that many tiny page inconsistencies are caused.
1. What is doctype?
Doctype is short for document type. It is used to describe the XHTML or html version you are using.
HTML public "-// W3C // dtd xhtml 1.0 transitional // en"
Indicates that the webpage complies with W3C // standard. The language is en, the format is dtd xhtml, And the XHTML version is 1.0.
2. What is a DTD?
Document Type Definition)
It contains the document rules, and the browser will explain the logo of your page according to your defined DTD and display it.
(1) Transition type (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 (frameset)
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 frameset // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
The selection of DTD will be followed by post instructions.
3. What is xmlns?
"Xmlns" is the abbreviation of XHTML namespace, called "namespace" Declaration
Because XML allows you to define your own identifiers, the identifiers you define may be the same as those defined by others, but they indicate different meanings. Errors may occur when files are exchanged or shared. To avoid such errors, XML uses namespace declarations, allowing you to identify your identity through a Web site.
4, xmlns = "http://www.w3.org/1999/xhtml" after the Web site can be changed to another?
XHTML is the identifier language for the transition from HTML to XML. It must comply with XML document rules, so you also need to define the namespace. Because xhtml1.0 cannot customize the identity, so its namespace is the same, is the http://www.w3.org/1999/xhtml
5. html Lang attributes
This attribute is often used in HTML tags to indicate that the entire document (File) uses a certain language, or in an XHTML tag.
<HTML xmlns = "http://www.w3.org/1999/xhtml" XML: lang = "ZH-CN">
Zh-CN indicates that the XHTML document uses Chinese en to indicate that the XHTML document uses English
The XML: lang attribute allows the search engine to understand the language in which your page is used. The search engine can classify pages by language or start some automatic translation systems. the XML: lang attribute can also enable the typographical tool to know the language in which your page is used, so that the corresponding typographical tool can switch between punctuation marks, conversion formats, and other operations.
Original webjxCodeIs Lang = "UTF-8" correct? My understanding is that UTF-8 is an encoding format, and the lang attribute value should be a string that represents the language type. Which teacher should explain it.
6. What doctype should we choose?
The ideal situation is of course a strict DTD, but for most of our designers who are new to web standards, the transitional DTD (XHTML 1.0 transitional) is currently the ideal choice. Because this DTD also allows us to use the identifier, element, and attribute of the presentation layer, it is easier to pass W3C code verification.
Note: The "presentation layer identifier and attribute" mentioned above refers to the tags purely used to control the presentation, such as the table used for typographical layout and background color identifier. In XHTML, identifiers are used to represent structures rather than representations. Our purpose of transition is to ultimately separate data from representations.
For example, a human model changes clothes. Models are like data. clothes are the form of representation. Models and clothes are separated so that you can change clothes at will. In html4, data and performance are mixed, and it is very difficult to change the form at one time. It's a bit abstract. We need to gradually understand this concept in the application process.
It took more than an hour to get so many things. Pseudo-originality is not easy!