+ 1
Can we interchange the #and. | For id and class
#intro { Color:red; Background-color:green; } .Test { Color:green; Background-color:red; } <div id="intro">... <div> <div class="Test">... <div>
4 Respostas
+ 3
You can interchange it..
as long as you follow the following rules:
Each id can only occur once.
Whereas class can occur one or many times.
+ 2
use both.
when you know the style going to be reused then use class, otherwise use id.
+ 1
Thank you calvin
0
Thank you