What is CSS Class Selector? Learn with Real Examples
What is CSS Class Selector? Learn with Real Examples
This Blog You Will Learn ஃ What is CSS Class Selector
ஃ Syntax
ஃ What is CSS Class Selector
ஃ Syntax
ஃ structure diagram examples
ஃ Examples
ஃ Output
What is CSS Class Selector
ஃ Examples
ஃ Output
What is CSS Class Selector
CSS Class Selector targets element with specific class attribute.
CSS Class Selector denoted (Dot . ) class name.
Syntax
}
ஃ structure diagram examples
CSS Class Selector With Practical Examples
Examples
CSS Class Selector Step-by-Step
Explain Program
Step
1]
<!DOCTYPE html>
- This
declare the document type.
- browser
that the document is written in html
Step 2]
<html>.... .
- html is the root element of the html
page.
- Every thing inside it is part of
the webpage.
Step 3]
text tag text appears on the browser tab.
Step 4]
.demo class Selector.
- change the text color any element with class demo to cadetblue.
.intro class selector.
- 5px gold inset border
- Text color dodger blue
- Ccentered text
closing the Tag
</style>
Step 6]
Body Section
<div> element with class demo
- all text inside color inherits
- heading and paragraph inside the demo div
- heading and paragraph appear in color cadet blue
</div> tag Close
- blue text
- center alignment
- gold inset border
Step 7]
closing the Tag
</body> </html>


Comments
Post a Comment