If we want to maintain uniformity in the look and feel of all same type of elements on the page, we can write CSS class with the element name.eg.
If we want to change the look and feel of all table and h1 element on the page, we can write like this.
The first class "table" will apply to all the tables on the page and second class "h1" will apply to all the h1 element of the page.
Note that the name of the class is not prefixed with the . (dot) as it happens with normal css class name.
Asked In: Many Interviews |