Dave's Brain

Browse - Programming Tips - What are some things to cleanup for html5?

Date: 2017oct5
Language: html

Q.  What are some things to cleanup for html5?

A.  This list is not complete.

Make sure these tags end with />

<meta ...> -> </meta .../> <link ...> -> </link .../> <br> -> <br/> <hr> -> <hr/>
Quote all assignments
<div class=myclass> -> <div class='myclass'> <input name=myname type=text> -> <input name='myname' type='text'>
I use singlequotes for most things and doublequotes to enclose javaScript
<div onclick="window.location='http://example.com';">
Make onClick all lowercase
onClick -> onclick
End <options> and <li>
<select> <option>One <option>Two <option>Three </select>
<select> <option>One</option> <option>Two</option> <option>Three</option> </select>

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.