0
HTML TO CSS LINKING ELEMENTS
So let's say we have an HTML file and a CSS file they are linked, so now I want to start working on the css code, so I know we have in line elements and block elements my question is how do I know whether to give the element a <id=""> or a <class=""> attribute?
3 odpowiedzi
+ 1
If you know for certain, that you'll only have 1 element of that type, use id, otherwise use class
0
Right on!
0
Ist of all id and class are not html tags they are attribute,
add a id or class in your element like this
<p class="text" id="main"></p>
You can put same class for two elements, but id should be unique for each element