XHTML Tutorial from W3Schools
<!--[if !supportLists]-->1. <!--[endif]-->XHTML Tutorial
<!--[if !supportLists]-->2. <!--[endif]-->Quiz
<!--[if !supportLists]-->3. <!--[endif]-->References(same as HTML References)
<!--[if !supportLists]-->1. <!--[endif]-->XHTML Tutorial
1.Introduction To XHTML
http://www.w3schools.com/xhtml/xhtml_intro.asp
XHTML stands for EXtensible HyperText Markup Language
XHTML is a stricter and cleaner version of HTML.
Learn the difference between HTML and XHTML
Convert HTML to XHTML
XHTML is HTML defined as an XML application.
W<chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C" w:st="on">3C</chmetcnv> defines XHTML as the latest version of HTML. XHTML will gradually replace HTML.
XHTML is almost identical to HTML 4.01
All new browsers have support for XHTML.
A click on this symbol: <!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" alt="Validate" style='width:66pt; height:23.25pt' o:button="t"> <v:imagedata src="file:///C:\DOCUME~1\dell\LOCALS~1\Temp\msohtml1\01\clip_image002.gif" o:href="http://www.w3schools.com/images/vcss.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->validates the CSS part of this page.
Explaining:
* Why you should use XHTML
* The syntax of XHTML
* How W3Schools was converted to XHTML
* XHTML validation
* XHTML modularization
2. XHTML - Why?
http://www.w3schools.com/xhtml/xhtml_why.asp
XHTML is a combination of HTML and XML (EXtensible Markup Language). (XML is more important for transferring data…)
3. Differences Between XHTML And HTML
http://www.w3schools.com/xhtml/xhtml_html.asp
http://www.w3schools.com/xhtml/xhtml_syntax.asp
You can prepare yourself for XHTML by starting to write strict HTML (XHTML is not very different from the HTML 4.01 standard.)
The Most Important Differences:
* XHTML elements must be properly nested
* XHTML elements must always be closed
* XHTML elements must be in lowercase
* XHTML documents must have one root element
XHTML Syntax:
Some More XHTML Syntax Rules:
* Attribute names must be in lower case
* Attribute values must be quoted
* Attribute minimization is forbidden
Here is a list of the minimized attributes in HTML and how they should be written in XHTML:
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" |
* The id attribute replaces the name attribute
* The XHTML DTD defines mandatory elements
4. XHTML DTD
http://www.w3schools.com/xhtml/xhtml_dtd.asp
<!DOCTYPE> Is Mandatory:
An XHTML document consists of three main parts:
* the DOCTYPE
* the Head
* the Body
The DOCTYPE declaration should always be the first line in an XHTML document.
There are currently 3 XHTML document types:
* STRICT
* TRANSITIONAL
* FRAMESET
The most common is the XHTML Transitional.
5. XHTML HowTo (Convert HTML To XHTML)
http://www.w3schools.com/xhtml/xhtml_howto.asp
The following steps were executed (in the order listed below):
A DOCTYPE Definition Was Added
Lower Case Tag And Attribute Names
All Attributes Were Quoted
Empty Tags: <hr> , <br> and <img>
The Web Site Was Validated
(Should we have used a converting tool? Well, we could have used TIDY. But we can modify it manually. )
6. XHTML Validation
http://www.w3schools.com/xhtml/xhtml_validate.asp
An XHTML document is validated against a Document Type Definition.
7. XHTML Modularization
http://www.w3schools.com/xhtml/xhtml_modules.asp
W<chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C" w:st="on">3C</chmetcnv> has split the definition of XHTML into 28 modules.
(XHTML Tags)
XHTML Standard Attributes
http://www.w3schools.com/xhtml/xhtml_standardattributes.asp
XHTML Event Attributes
http://www.w3schools.com/xhtml/xhtml_eventattributes.asp
8. You Have Learned XHTML, Now What? (XHTML Summary)
http://www.w3schools.com/xhtml/xhtml_summary.asp
The next step is to learn CSS and JavaScript.
<!--[if !supportLists]-->2. <!--[endif]-->Quiz
http://www.w3schools.com/xhtml/xhtml_quiz.asp
<!--[if !supportLists]-->3. <!--[endif]-->References(same as HTML References)
和HTML的语法相同,只需要注意XHTML和HTML不同的地方即可。