Class Name
CSS is not limited to selecting elements by tag name. HTML elements can have more than just a tag name; they can also have attributes. One common attribute is the
class attribute. It's also possible to select an element by its class attribute.
For example, consider the following HTML:
<p class="brand">Sole Shoe Company</p>
The paragraph element in the example above has a
class attribute within the <p> tag. The classattribute is set to "brand". To select this element using CSS, we could use the following CSS selector:
.brand {
}
To select an HTML element by its class using CSS, a period (
.) must be prepended to the class's name. In the example above case, the class is brand, so the CSS selector for it is .brand.
Loved your blog. Keep posting. java training in chennai
ReplyDeleteHey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
ReplyDeleteJava Training in Chennai | J2EE Training in Chennai | Advanced Java Training in Chennai | Core Java Training in Chennai | Java Training institute in Chennai