1 XHTML - Lesson 2/5 Sun Jul 11, 2010 4:22 am
Unknown Data
Registered Member
XHTML - Lesson 2/5 Learn XHTML - Part 2 |
This is lesson 2 out of 5. The structure in a XHTML document The structure in a XHTML document reminds a lot of the structure in a HTML document. But there are differences, that can give you big problems if you don't follow the rules. Actually we can say that the formal requirements are just higher in this new language. A normal document could fx be coded like this.
Labeling and indication of our coding In part 1 out of five we learned that XHTML is written in the language XML. That's why the first line of a XHTML document got the labeling of witch XML version we use. In this case we are using XML version 1.0 and then we write:
In the next line we should indicate witch DTD we use. DTD is a kind of a rule set. In XTHML there exist 3 DTD's to chose between: Transitional, Strict and Frameset. Strict DTD: should be used if you wish to code in the recommended standard.
In a XHTML document should the <html> element contain the attribute xmlns, there only got the value "http://www.w3.org/1999/xhtml". I'll not explain all about this, because there only are one thing to write, and you would got very confusing if you just heard about it. So lets leave it. The element <htmL> contains also the attribute xml:lang, that informs us about witch language we are using. The language is indicated by the ISO639 standard, were we can find all languages in the world. I'm from Denmark and that's why I'm writing "da".
|
Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators. |