I’ve done oodles of research and reading, but I still cannot find a straight, simple answer. My first impression is that I would like to use it - I like the simplicity of it and the additional meaningful tags (so I don’t have to use a ridiculous amount of divs).
I have a few concerns, though.
My main concern is how it will appear in older browsers. By using the new tags, will the site still display properly?
My other concern is regarding validation. I know that it won’t be valid by W3C because they haven’t supported it yet, but I use the validator to check my work for errors. Is there a way for me to still check for errors (e.g. a different validator, or changing to a different DTD just to validate, then switch back)?
For reference, I’m redesigning a simple small business’s website (~5 pages). It currently uses xhtml 1.0 transitional, and I think I could really simplify the markup. There’s no special functionality in the site and it will always be more of a static site…the only “special” part of it is a contact form, which isn’t too wild.
I hope I was clear enough; please let me know if I wasn’t. So what do you think I should do?
The first question is … what benefit do you see the site getting from using HTML5? If there isn’t any then don’t use it.
Sometimes you might find advantages for things like non-critical form validation … that’s fine, because it will work OK in older browsers, just without running the validation.
If you’re planning on using HTML5 elements/structure such as <section> and <header> then you will run into problems on older browsers, which render any element they don’t recognise as display:inline; by default. IE in particular won’t allow you to specify CSS for an element it doesn’t recognise. There are a couple of ways round this problem - see http://www.sitepoint.com/forums/showpost.php?p=4943308 for a couple of links.
The main benefits I see are being able to use the HTML5 elements/structure that you mentioned. I think it just makes the code cleaner and easier to read. Since it’s not too big of a site, though, I guess just creating divs wouldn’t be too much of a hassle.
Besides that, it eliminates the issue of what DTD I should use. I somewhat understand the differences between html/xhtml and transitional/strict, but I still don’t know what would work best for this site (as I said before, it’s nothing fancy, just a contact form and maybe a few js effects). Any ideas or recommendations?
On a related note, what about the use of CSS3? I’m interested in using properties like border-radius and rgba. How will this affect the appearance of my page in older browsers?
99% of sites don’t need to use XHTML. Years ago I jumped onto xhtml to be cool and hipp, but never extended it (hence the x). You should definately use strict vs traditional. Traditional was made for moving from HTML 3 to 4.