When functionalities of html attributes and css styles overlap

Posted by AspOnMyNet on Stack Overflow See other posts from Stack Overflow or by AspOnMyNet
Published on 2010-03-29T18:18:56Z Indexed on 2010/03/29 18:23 UTC
Read the original article Hit count: 434

Filed under:
|

1) If inside CSS file we specify the following style:

.td
{ text-align:center; }

While in a Html file we have

<td align=”right” … >

then value set in CSS file will take precedence over an inline html attribute and thus elements contained inside <td> cell will be aligned to the center.

a) Is same true for all html attributes? Meaning if a CSS rule and an html attribute functionalities overlap , will the CSS rule always take precedence?

BTW – I know we should usually prefer using CSS rules vs html attributes

thanx

© Stack Overflow or respective owner

Related posts about html

Related posts about css