|
Blue Forest http://www.lslnet.com at 8:28 on August 25, 2006
(Translation) learning new XHTML standards (1)
Based on W3C [color=Red] School article translated by FLASHKIT China (http://www.flashkit.com.cn rough translation), an inappropriate term please correct me! [/color]
1. The difference between HTML and XHTML :
A. XHTML must be full nest. If ": b><i> :" /i></b>.
B. XHTML documents must be completely correct format. If
"Html>
"Head are. . . "/head>
"Body>. . . "/body>
"/html>
C. All signs must be lowercase names state. If
"Body>
"P>This is a paragraph</p>
"/body>
D. All XHTML elements must be closed. If
"P>This is a paragraph</p>
"P>This is another paragraph</p>
E. The same elements must be on the air in the state. If
"Br>=<br everywhere" hr>=<hr everywhere
"<img Defended" happy.gif "alt" Happy face, "and" =<img defended "happy.gif" alt "Happy face" everywhere
……
To make the browser more now XHTML compatible, you must sign "/" inserted an extra box. This is very important!
2. XHTML grammar
A. Attribute names must be lowercase input
B. Attribute value must use double quotation marks under the "table width=" 100% ""
C. All the attributes to a given value
Following is the wrong way :
"Dl compact>
"Input checked>
"Input readonly>
"Input disabled>
"Option selected>
"Frame noresize>
The following is the correct wording :
"Dl compact=" compact ""
"Input checked=" checked "everywhere
"Input readonly=" readonly "everywhere
"Input disabled=" disabled "everywhere
"Selected= option" selected "everywhere
"Frame noresize=" noresize "everywhere
Following is a comparison of the differences between HTML and XHTML attributes Assignment
HTML XHTML
Compact= compact "compact"
Checked checked= "checked"
Declare declare= "declare"
Readonly readonly= "readonly"
Disabled disabled= "disabled"
Selected selected= "selected"
Defer defer= "defer"
Ismap ismap= "ismap"
Nohref nohref= "nohref"
Noshade noshade= "noshade"
Nowrap nowrap= "nowrap"
Multiple multiple= "multiple"
Noresize noresize= "noresize"
D. Id attribute with a name similar attributes to replace. If
This is wrong :
"<img Defended" picture.gif "name="_ftn1"" picture1 "everywhere
This is correct :
"<img Defended" picture.gif "filled="f"" picture1 "everywhere
Sometimes, in order, or more compatible with older browsers, they can use id attribute name.
"<img Defended" picture.gif "filled="f"" picture1 "name="_ftn1"" picture1 "everywhere
E. Lang attributes will be used every XHTML document, which showed the attributes specified XHTML language.
F. Mandatory attributes XHTML
All XHTML documents must have a DOCTYPE description, the following is one of the most simplistic code :
"!DOCTYPE Doctype goes here>
"Html xmlns=" http://www.w3.org/1999/xhtml ""
"Head are
"Title>Title goes here</title>
"/head>
"Body>
Body text goes here
"/body>
"/html>
XHTML attributes attention DOCTYPE itself is not, so it must be closed before the end of it.
3. XHTML DTD
A.XHTML the standard definition of the three different document definition format. The most common definition is the first document of the transition period. An XHTML document must contain three main parts :
. the DOCTYPE
. the Head
. the Body
B.3 species Document Type Definition
. STRICT
. TRANSITIONAL
. FRAMESET
XHTML 1.0 Strict
"!DOCTYPE Index.html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" "
Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.
XHTML 1.0 Transitional
"!DOCTYPE Index.html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" "
Use this when you need to take advantage of HTML 's presentational features and when you want to support browsers that not specified' t understand Cascading Style Sheets.
XHTML 1.0 Frameset
"!DOCTYPE Index.html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" "
Use this when you want to use HTML Frames to partition the CPU window into two or more frames.
4.XHTML confirmed
A. XHTML module
W3C XHTML definition will be divided into 28 models :
Module name Description
Applet Module Defines the deprecated* applet element.
Base Module Defines the base element.
Basic Forms Module Defines the basic forms elements.
Basic Tables Module Defines the basic table elements.
Bi-directional Text Module Defines the bdo element.
Client Image Map Module Defines CPU side image map elements.
Edit Module Defines the editing and elements del ins.
Forms Module Defines elements used in all forms.
Frames Module Defines the frameset elements.
Hypertext Module Defines the a element.
Iframe Module Defines the iframe element.
Image Module Defines the various factions element.
Intrinsic Events Module Defines attributes like onblur and onchange event.
Legacy Module Defines deprecated* elements and attributes.
Link Module Defines the link element.
List Module Defines the list elements o, li, ul, dd, dt, and dl.
Metainformation Module Defines the meta element.
Name Identification Module Defines the deprecated* name attribute.
Object Module Defines the object and param elements.
Presentation Module Defines presentation elements like b and i.
Scripting Module Defines the script and noscript elements.
Image Map Server Module Defines server side image map elements.
Structure Module Defines the elements html, head, title and body.
Style Attribute Module Defines the style attribute.
Style Sheet Module Defines the style element.
Tables Module Defines the elements used in tables.
Target Module Defines the target attribute.
Text Module Defines text container elements like p and h1.
|
|