Showing posts with label CSS Element Selector CSS selector. Show all posts
Showing posts with label CSS Element Selector CSS selector. Show all posts

Tuesday, February 13, 2024

css element selector

              CSS Selector 

1] css selector are used to select the content to style.

2] Selector are the part of css rule set.

3] css selector is a pattern used to select and style elements on webpage.

    Four type of css selectors 

1] CSS Element Selector

2] CSS ID Selector

3] CSS Class Selector

4] CSS Universal Selector


1] CSS Element Selector :-

   1] Selects HTML elements based on their tag names 

     eg.  ' h3 ' selects all ' <h3> ' elements.


CSS Element Selector :-

Program:-

<!DOCTYPE html>
<html>
<head>
    <title>css selector</title>
    <style>
        h3
        {
               text-align : center;
               color:blueviolet;
        }
    </style>
</head>
<body>
    <h3>heading will be affected by style</h3>
    <p>css selector </p>
    <p>css element element</p>

   
</body>
</html>

CSS Element Selector :-

Output :-

css element selector output





READ MORE :-

HTML radio button

html form

html description list

html unordered list

HTML meta attribute

script element is html

html list

add background image html

html anchor tag