Showing posts with label class selector. Show all posts
Showing posts with label class selector. Show all posts

Friday, February 16, 2024

css class selector

 css class selector

1]  css class selector write (.) character.

2]  css class selector is a fundamental part of cascading style sheets target html elements    

       based on their class attribute.

Syntax :-

. class 

{

text-align : center;

color :pink;

}

CSS Class Selector

Example :-

<!DOCTYPE html>
<html>
<head>
    <title>css class select </title>
    <style>
    .web
    {
        text-align : center;
        color:yellowgreen;
    }
</style>
</head>
<body>
    <h2 class="web">
        hello https://webdesigningtheory.blogspot.com/ </h2>

        <h3>This is program of Css ID Selector</h3>
    </h2>
   
</body>
</html>

CSS Class Selector 

Output :-

css class selector output




READ MORE :-

html class attribute

html block and inline element

responsive image grid

background image in text html

html id attribute

split screen into two more color html

menu card html

css column gap property html

html table blog post

html table program

css id selector html