CSS - Short Notes(BigBinary)- Ongoing
.png)
Class Selectors To style specific elements, use the class attribute in HTML and prefix the class name with . in CSS. HTML- <h1>First Heading</h1> <h1 class="highlight">Second Heading</h1> <h1 class="highlight">Third Heading</h1> CSS- . highlight { color: red; } Multiple Classes - like <h1 class="title center">The Times of India</h1>, then .title{} and .center{}. Use classes when more common elements present. style only one element on the page differently, using a class selector is not the best way. We can use the HTML id attribute to select that single element. The # symbol is used before the id name to select it. Universal selector - *{} for more freedom in color...