CSS Selectors

Unique beauty

CSS Selectors: 

 ðŸ‘‰Simple selectors (select elements based on name, id, class)

👉Combinator selectors (select elements based on a specific relationship between them)

👉Pseudo-class selectors (select elements based on a certain state)

👉Pseudo-elements selectors (select and style a part of an element)

➡There are several different types of selectors in CSS.

*CSS Element Selector.

*CSS Id Selector.

*CSS Class Selector.

*CSS Universal Selector.

*CSS Group Selector.

➡There are three Selectors:

 ðŸ‘€Type, class, and ID selectors.

➡Syntax:

<!DOCTYPE html>

<html>

<head>

<style>

p {

  text-align: center;

  color: red;

</style>

</head>

<body>

<p>Every heart deserves pain.</p>

<p id="para1">Me too!</p>

<p>And me!</p>

</body>

</html>

➡Output :

     Every heart deserves Pain

                      Me tooo!

                      And me!

Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send