- Basic structure and rules of 1,xhtml
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
Attention:
1, to develop a good habit, in the future when we write empty labels, to the slash (/) before adding a space, such as <br/>
2, all attribute names for all elements should be lowercase, all attributes must specify attribute values, do not abbreviate, and all attribute values are quoted.
- 2,xhtml using DTDs to specify semantic constraints
The DTD information should be added at the beginning of the XHTML document, which is a necessary part of the XHTML document, so we should have a DTD for writing a standard HTML document. For example: <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
There are three types of XHTML documents:
STRICT (Strict type): Requires clean labeling to avoid confusion in performance. Used in conjunction with CSS in general.
Transitional (Transition type): When you need to take advantage of HTML performance features, and when you need to write XHTML for browsers that do not support cascading style sheets.
FRAMESET (frame type): When the browser window needs to be split into two or more frames using the HTML framework.
1,xhtml 1.0 Strict:
<! DOCTYPE htmlpublic "-//w3c//dtd XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
2,xhtml 1.0 Transitional:
<! DOCTYPE htmlpublic "-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
3,xhtml 1.0 frameset<! DOCTYPE html
Public "-//W3C//DTD XHTML 1.0 frameset//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >
Second, the basic HTML syntax