So here is a simple test case
What I'm trying is that if we use attributes for style elements (I know this is a very bad idea, but I did it for experiments)
So the question is, are CSS selector selector styles more specific than HTML attributes?
View CSS - 1 / HTML - 0 <!-- Specificity -->
If CSS not used, HTML - 1 <!-- Specificity -->
HTML test case
<table border="1">
<tr>
<td>Hello 1</td>
<td>Hello 2</td>
<td>Hello 3</td>
</tr>
</table>
CSS
table, table td {
border: 0;
}
So, general CSS is specific than HTML for styling? Or we can override CSS with attributes other than attribute style.
source
share