Translation: Linyupark
You can prepare yourself for XHTML by starting to write strict HTML.
You can start by writing strict HTML code to prepare for your xhml.
--------------------------------------------------------------------------------
Ready for XHTML
How do you prepare for XHTML?
XHTML is the next generation of HTML, but it'll of course take some time before browsers and other software products are Ready for it.
XHTML is the next language of HTML, but it will certainly be delayed for a while before the advent of new browsers and other related software products.
In the meantime there are some important things with can do to prepare for it. As you'll learn from this tutorial, the XHTML is isn't very different from HTML 4.01, so bringing your code up to 4.01 Standar DS is a very good start. We complete HTML 4.01 reference can help for you.
In the meantime, do something important to prepare for it. Just as you can learn something from this tutorial, XHTML is not much different from HTML4.01, so rewriting your code to conform to the HTML4.01 standard is a very good start, and our complete HTML4.01 reference can help you solve the problem.
In addition, your should start now to write your HTML code in lowercase letters, and NEVER make the bad habit of skipping E nd tags like the </p>
In addition, now you should start writing your HTML code in lowercase letters, and never have the bad habit of skipping end tags like </p> before.
Happy coding!
Happy Coding!
--------------------------------------------------------------------------------
The Most Important differences:
A very important distinction:
XHTML elements must be properly nested
XHTML elements must be nested properly
XHTML documents must be well-formed
XHTML documents must be formatted correctly
Tag names must be in lowercase
Label name must be lowercase
All XHTML elements must is closed
All XHTML elements must be closed
--------------------------------------------------------------------------------
Elements must be properly Nested
Elements must be properly nested
In HTML some elements can is improperly nested within each of the same as this:
Some elements in HTML can be used without the proper nesting of each other like this:
<b><i>this text is bold and italic</b></i>in XHTML all elements must be properly nested within EAC H other like this:
All elements in XHTML must be reasonably nested like this:
<b><i>this text is bold and italic</i></b>note:a common mistake in nested lists, are to forget tha t the inside list must is within a LI element, like this:
Note: It is often a mistake to make a list nested by forgetting that the new list inserted in the list must be in a <li> tag, like this:
<ul>
<li>Coffee</li>
<li>tea
<ul>
<li>black tea</li>
<li>green tea</li>
</ul>
<li>Milk</li>
</ul>this is correct:
This is the right thing to do:
<ul>
<li>Coffee</li>
<li>tea
<ul>
<li>black tea</li>
<li>green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>notice that we have inserted a </li> tag after the </ul> tag in the "correct" code example.
In this correct code example, be aware of adding a </li> tag after </ul>
--------------------------------------------------------------------------------
Documents must be well-formed
Document format must be qualified
All XHTML elements must is nested within the All XHTML tags must be nested within the
<body> ... </body>
--------------------------------------------------------------------------------
Tag Names must be in Lower case
Label name must be lowercase
This is because XHTML documents are XML applications. XML is case-sensitive. Tags like <br> and <BR> are interpreted as different tags.
This is because XHTML documents are XML applications, and XML is case-sensitive, as <br> and <BR> are considered to be two different tags.
This is wrong:
This is wrong:
<BODY>
<p>this is a paragraph</p>
</body>this is correct:
That's right:
<body>
<p>this is a paragraph</p>
</body>
--------------------------------------------------------------------------------
All XHTML Elements must is Closed
All XHTML elements must be closed
Non-empty elements must have a end tag.
Non-empty elements must have a close tag.
This is wrong:
This is wrong:
<p>this is a paragraph
<p>this is another paragraphthis is correct:
The right thing to do:
<p>this is a paragraph</p>
<p>this is another paragraph</p>
--------------------------------------------------------------------------------
Empty Elements must Also be Closed
An empty element must also be closed
Empty elements must either have a end tag or the "Start tag must with/>.
Empty elements must also have an end tag or start tag end with/>.
This is wrong:
This is wrong:
This is a break<br>
Here comes a horizontal rule:Here's an image of this is correct:
That's right:
This is a break<br/>
Here comes a horizontal rule:IMPORTANT Compatibility Note:
Note the key to compatibility:
To make your XHTML compatible with today's browsers, you should add a extra space before the "/" symbol as this: ; BR/>, and this: To make your XHTML compatible with your current browser, you have to add a special space before/symbol, like this: <br/> and this: