The following rules have to be considered when switching to XHTML.
well formed code
<p>text</p>
- the tough one is this:<img src="pic.jpg">
<img src="pic.jpg"></img>
.mergethe two into one, looking like this:
<img src="pic.jpg" />
,
the end has to have a space ' '
and a slash '/' and then the closing bracket
'>'.Tags must not overlap:
this is a no-no:
The other important rule is a corollary of our new found philosophy of keeping Content
and
Design
strictly separated: All those good old HTML tags that have to do with the looks are history.
Don't use tags like <font>
or <center>
or parameters like VALIGN
or ALIGN
.
For all those oft-used and quite handy commands exist new CSS pendants.
Another old HTML tag that is now deprecated, is name="this"
like when you wanted an anchor to make
the visitor jump to a certain part of the HTML page. You used <a href="page.html#this"
and then
the paragraph you would want the visitor to jump to you would use <p name="this">
.
No more name, please! One has to use id="this"
now.
Considering those important facts, XHTML code in itself is hardly any different to HTML, it will take you not very long to get into it. The harder part is the CSS, not hard as in hard-to-grasp, but hard as in a whole bunch of new commands to learn. We will get at them in due course. The last step to a real XHTML page is how the page gets served from the web server to the browser, but more about that in the Interludium.