0
How does this relate,for example <div id="intro"> and <p class="first">
2 Respuestas
0
If you write it as you wrote than nobody can answer you correctly. Is <p> in <div> or the opposite? Are right behind each other?
0
Use a class when you want to consistently style multiple elements throughout the page/site.
For example, the jQuery form validator plugin heavily uses classes to define the validation
Use the ID when you have a single element on the page that will take the style.
Example:-
#header_id {font-color:#fff}
.header_class {font-color:#000}
(Note that CSS uses the prefix # for IDs and . for Classes.)