HTML 5 has a lot of nifty features like simplified tags for character set, scripts & document type. Converting to HTML 5 will help users and search engines alike parse your website.
Many add-ons to websites like the Facebook Like button reference attributes that are not valid unless you use HTML 5.
Converting to HTML 5 is relatively easy using Dreamweaver using File | Convert | Html 5. You will need to validate your code and get rid of obsolete attributes & keywords like audience, align, hspace, vspace, width, summary, bgcolor, and border. Most of these you can replace with CSS. I have listed some of the common CSS replacements below. You may want to customize as needed.
Best practice is to use an external CSS style sheet so you should put your CSS in a file like basic.css and include it in your meta-tags. The following is my meta-tag that I used.
since my CSS is actually 2 levels above the web page I am adding it to. If your CSS & web page are in the same folder, you won't need the relative file path descriptors.
Now that you have the CSS in an external file you can just reference them via class or id. I like class since I can reference them multiple times. id can only be referenced once per page.
Use Validator to check your code & replace the obsolete code with CSS. It takes some patience but you will be glad you are not using obsolete attributes & keywords on your website.
Example - Replace obsolete Tags with Class in External File :
The following uses obsolete hspace, vspace and align
That seems like a lot of work and you may have a lot of validation errors but don't dismay as you can use Dreamweaver Find (CTRL F) and replace all occurrences of an obsolete tag in the current page, selected files. or the entire site. I suggest taking it slow at 1st and working on a copy of your page or site as multiple replacements can have unexpected results if your criteria is too general.
Comments (0)