<div align="left" class="abcd"> css old method
When I use the validator, it says that
the align attribute on the div element is obsolete. Use CSS ins开发者_如何学JAVAtead
What do I do to resolve this?
Add a text-align
declaration to a style block for .abcd
:
.abcd { text-align: left; }
or set the style of the div
itself locally:
<div class="abcd" style="text-align: left;">
Use style attribute. For example:
<div style="text-align:center"></div>
Do not use
<div align='left'>lefty</div>
Use
<div style='text-align:left'>lefty</div>
Don't
1] <div align='left'></div>
Do
1] <div style="text-align:left"></div>
OR
2] .divClass { text-align: left; }
<div class="divClass"></div>
精彩评论