04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I think we’ve been pretty<br />

darn strict in our <strong>HTML</strong>.<br />

Let’s throw the strict<br />

DOCTYPE in and see what<br />

happens.<br />

Here’s the strict version of<br />

the <strong>HTML</strong> 4.01 DOCTYPE.<br />

standards, compliance, and all that jazz<br />

To move from transitional <strong>HTML</strong> 4.01 to strict, we<br />

change the DOCTYPE to the strict version. Once we’ve<br />

done that, the validator (and browsers) will assume we’re<br />

playing by stricter rules that don’t allow some of the<br />

legacy <strong>HTML</strong>. We’ll talk about those rules in a sec, but<br />

for now let’s give the strict DOCTYPE a try. To do that,<br />

we’ll start by taking a quick look at the DOCTYPE:<br />

This stuff is the same as<br />

the transitional DOCTYPE.<br />

Overall this all looks<br />

remarkably similar.<br />

The word “Transitional” is gone.<br />

<br />

Remember this URL defines what<br />

belongs in strict <strong>HTML</strong>.<br />

No big differences here. The “transitional” word is<br />

gone and we have a different URL that defines the strict<br />

version of <strong>HTML</strong> 4.01. Let’s replace the transitional<br />

DOCTYPE <strong>with</strong> the strict and try to validate.<br />

you are here 245

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

Saved successfully!

Ooh no, something went wrong!