When functions of html attributes and css styles overlap

1) If the following style is specified inside the CSS file:

td
{ text-align:center; }

In the html file we have

<td align="right" … >

then the value set in the CSS file will take precedence over the built-in html attribute, and therefore the elements contained within the cell <td>will be centered.

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

By the way - I know that we usually prefer to use CSS rules vs html attributes

thank

+3
source share
1 answer

Which set of definitions, HTML attributes, or CSS properties take precedence?

Textbook answer:

CSS HTML. , HTML CSS, CSS.

(: http://www.hwg.org/resources/faqs/cssFAQ.html)

:

, , unit test (-), "" , .

, , HTML , .

+5

Source: https://habr.com/ru/post/1739020/


All Articles