04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

I don’t get it. We changed<br />

the DOCTYPE and added a couple<br />

of new attributes, but the rest of<br />

this example is totally like <strong>HTML</strong><br />

4.01. So, what’s the big deal?<br />

This is going to sound very anticlimatic, but<br />

X<strong>HTML</strong> is XML while <strong>HTML</strong> is, well, just<br />

<strong>HTML</strong>. The big distinction may be difficult for<br />

you to see at first glance, but the reason XML<br />

is a good thing (and the reason the W3C and<br />

others have gone to all the trouble of creating<br />

X<strong>HTML</strong>, when they already had <strong>HTML</strong>) is that<br />

once your pages are written in X<strong>HTML</strong>, all sorts<br />

of things become possible that aren’t possible<br />

<strong>with</strong> <strong>HTML</strong>. (You’ll get a feel for some of those<br />

things in just a sec).<br />

There’s another way to look at this: the<br />

differences between <strong>HTML</strong> and X<strong>HTML</strong> can<br />

all be seen on the previous page. You’ve got a<br />

new DOCTYPE, and some minor changes to<br />

attributes and the way you write empty elements.<br />

These small changes are all that is required to<br />

turn your <strong>HTML</strong> into X<strong>HTML</strong>.<br />

Now that you know that moving to X<strong>HTML</strong> is<br />

so easy, it’s time for you to get a better idea of<br />

what it gets you.<br />

moving to xhtml<br />

you are here 269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!