What Is CSS?
What Is CSS?
The selector points to the HTML element you want to style. The
declaration block contains one or more declarations separated by
semicolons. Each declaration includes a CSS property name and a
value, separated by a colon. Multiple CSS declarations are separated
with semicolons, and declaration blocks are surrounded by curly
braces.
Created By:- Aman Singh 2
CSS Selectors
CSS selectors are used to "find" (or select) the HTML elements you want
to style. Some of them are:-
• The CSS element Selector
• The CSS id Selector
• The CSS class Selector
• The CSS Universal Selector
• The CSS Grouping Selector
Here, all <p> elements on the page will be center-aligned, with a red
text color.
The CSS rule above will affect every HTML element on the page.
• External CSS
• Internal CSS
• Inline CSS
Internal CSS
It is use apply a style to a single HTML page.
<html>
<head>
<style>
h1{
text-align: center;
}
</style>
<body>
<h1>Internal</h1>
</body>
</html>
When using the shorthand property the order of the property values is:
-> background-color
-> background-image
-> background-repeat
-> background-attachment
-> background-position
CSS border-style
• Dotted
• Dashed
• Solid
• Double
• None
• Hidden
Created By:- Aman Singh 23
CSS border-width
The border-width property specifies the width of four borders.