HTML Guide for css
<img> tags no longer accept a border attribute. This can be defined using CSS instead, for example:
<img src="..." alt="..." style="border:0;" />
The <center> tag is no longer valid in HTML, you should use CSS instead, for example:
<p style="text-align:center">this text will be centered</p>
The <font> element, used to define the font face, size and color in previous versions of HTML, is no longer valid in HTML5. Instead, you should rely on CSS styles.
For example, you can define a font size of 12px, bold text with inline styles like this:
<p style="font-size: 12px; font-weight: bold;">some text</p>
The <tt> tag, used in HTML4 to apply a monospaced (fixed width) font to the text, was deprecated in HTML5. Instead, you should use CSS to apply the desired font.
Example, instead of this deprecated code:
<tt>This is deprecated</tt>
You can define a monospaced text using font-family:
<span style="font-family: monospace;">This is monospaced text</span>
The HTML <style> element contains style information for a document, or part of a document, defined in CSS. This element does not need the type attribute anymore, so it should be omitted.
For example, this style defines that <p> elements should be in red color.
<style type="text/css">
p {
color: red;
}
</style>
<p>This text will be red.</p>
But, the type attribute is not used anymore, so we can just use this:
<style>
p {
color: red;
}
</style>
<p>This text will be red.</p>
<td> elements no longer accept a valign attribute. This can be achieved using CSS like this:
<td style="vertical-align:middle;">content</td>
Both <table> and <td> elements no longer accept a width attribute. Instead, you should use CSS as in this example:
<table style="width:100%;">
<tr>
<td style="width:50px;">Name</td>
</tr>
</table>
You’re using an attribute X that is no longer valid for element Y, but you can use CSS to achieve the same effect.