Css
CSS stands for Cascading Style Sheets.css describes how html elements are to be displayed on screen, paper, or in other media.Css saves a lot of work. It can control the layout of multiple web pages all at once.
Css has 3 types
1.Inline:-Add a style line by Line(directly in html)
2.Internal:-Add style in body
3.External:-Linking external css file
Css Syntax
ex:-p {
text-align: center;}
p is a selector
text-align
is a property, and center
is the property value
Css selectors
CSS selectors are used to "find" the HTML elements you want to style.
- Simple selectors:-
The id attribute of an HTML element to select a specific element.
- Combinator selectors
- class selectors(select elements based on a certain state)
- Pseudo element selectors (select and style a part of an element)
- Attribute selector (select elements based on an attribute or attribute value)
No comments:
Post a Comment