XHTML 2.0 is just around the corner, and many changes have taken place - but just what are these changes, and how do they affect you and your site?
When XHTML 2.0 becomes final it may not be exactly the same as it is now whilst during the draft stages, but when it does there will still be a lot of differences between XHTML 1.1 and 2.0. This could mean some changes for you as a developer or as a designer as you will have new tags to work with too.
Previously the only way to indicate different sections of a document using nothing but semantic meaning was to use the various header tags (h1 - h5); now however we have the section tag and it's associated h tag.
<section>
<p>....</p>
<h>This is another second-level heading</h>
<p>....</p>
<section>
<h>This is a third-level heading</h>
<p>....</p>
</section>
</section>
The above example comes from the W3C Working Draft and shows the use of nested sections. What this means is that where previously a heading had to have the correct flow (i.e. from h2 to h3, and not h2 to h4 for example) you no longer have to worry about maintaining the correct flow on a dynamic page as it will be handled for you. In the above example the first h has higher priority than the second as the second is inside a nested section. If the there was to be another section alongside the first one then it would share the same priority of heading. One of the reasons the W3C give for this change is because of the misuse the old headings got in the past.
The next change they list is that the hr (horizontal rule) tag has now been deprecated. There is still a tag to perform the same function however, just it is now more aptly named separator as it not always horizontal, nor is it always a rule. This isn't really a major change for developers and designers alike, it has no functional change, but it does mean that to keep up-to-date existing hrs should be replaced.
Another great new tag is the l tag - it's intended use I think is mainly for presentational purposes, and has no real semantic meaning.
<blockcode class="program">
<l>program p(input, output);</l>
<l>begin</l>
<l> writeln("Hello world");</l>
<l>end.</l>
</blockcode>
The above example again comes from the W3C Working Draft, though if you try it in Firefox 2.0.0.7, or IE6/7 you will find that the content all appears on the same line. This example also demonstrates the use of another new tag, one which is associated very closely with the l tag. These two tags (blockcode and l) used together will be very useful on development blogs such as this site to provide a simple method of showing line numbers in code.
The final change to structuring that they mention is that the p (paragraph) tag has now been changed so that it will validate when it contains other structural elements such as tables and lists.









