Attributes you shouldn't be using
In HTML5, none of the attribute should be used for styling purpose. Rule of thumb is, styling should be taken care by CSS.
What I meant for "styling" is such as font size, color, border, font family, whatever is used for presentational purpose.
In the table below, you should be avoid using attributes below in the elements listed in following table.
Attributes | Elements |
---|---|
align | caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. |
alink, link, text and vlink | body |
background | body |
bgcolor | table, tr, td, th and body |
border | table and object |
cellpadding and cellspacing | table |
char and charoff | col, colgroup, tbody, td, tfoot, th, thead and tr |
clear | br |
compact | dl, menu, ol and ul |
frame | table |
frameborder | iframe |
height | td and th |
hspace and vspace | img and object |
marginheight and marginwidth | iframe |
noshade | hr |
nowrap | td and th |
rules | table |
scrolling | iframe |
size | hr |
type | li, ol and ul |
valign | col, colgroup, tbody, td, tfoot, th, thead and tr |
width | hr, table, td, th, col, colgroup and pre |