some selectors to design HTML page πŸ‘‰πŸ‘‰πŸ‘‰


SELECTORS IN CSS WITH DESCRIPTION :-

CSS selectors are used to select the content you want to style. Selectors are the part of CSS rule set. CSS selectors select HTML elements according to its id, class, type, attribute etc.

 

selector

description

1.   Type selector h1{}

h1 selects all elements of any type with class h1 inside of the body element

2.   Universal *{}

 universal selector ( * ) matches elements of any type

3.   Class selector .box{}

 .class selector selects elements with a specific class attribute.

4.   Id selector #unique{}

The id selector uses the id attribute of an HTML element to select a specific element

5.   Attribute a[title]{}

The [attribute] selector is used to select elements with a specified attribute.

6.   Pseudo class

p:first-child{}

The :first-child selector allows you to target the first element immediately inside another element

7.   Pseudo element

 P:first-line{}

In CSS, the ::first-line pseudo-element can only have an effect

8.   Child combinator article>p

A child combinator describes a childhood relationship between two elements.

 

 

                            

Comments

Popular Posts