What is the proper Meta syntax?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
content="Postage Meters save money and time, and aren't as expensive as you might think!">
The DOCTYPE is XHTML, so the element must be closed i.e. />
If you are in any doubt, run your code through the w3 validator and see if it reports an error.
It depends. If you're using HTML, just plain old '>'. If you're using fauXHTML, you need ' />'
Here is my Header - which I've never really understood?!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Which coding style should I use?
You will definitely need to close it with /> if you are using xhtml strict. As Victorinox said, try running your code through the validator, it's the easy way to see if your page will validate or not
Better to switch out the doctype for an HTML Strict one and get rid of all the extraneous />s. (A lot of people say that every browser worth its salt will handle the HTML 5 doctype, even IE6, and even if you don't use a smidge of actual HTML 5. Me, I'm just not certain about that. Anyone want to ease my doubts?)
The HTML5 doctype will work with IE 6+ but its when you start using the new elements that the problem starts, because the news elements such as <header>, <section>, <footer> etc... don't exist in the DOM structure in IE 6, 7 & 8 for example that won't appear. There are a few pollyfills as they are called to rectify this such as the HTML5Shiv which is the most common, the only other thing you need to grab is the HTML5 reset CSS.
There is a few developers who have made their own reset CSS but the most common one used was designed by Eric Meyer, when you bring these 2 things together the HTML5 elements work a treat in IE 6+
This topic is now closed. New replies are no longer allowed.