1) Introduction to CSS
CSS stands for Cascading Style Sheet. Cascading meaning is CSS applies one style on top of another and Style Sheet is designing the layout of web. CSS is a simple mechanism of describing common presentation semantics for every page in a website. It can control the layout of multiple web pages all at once.
Version of CSS:
CSS1
CSS2
CSS3
Why Learn CSS?
- Styling the HTML tags
- Responsive website
- Animation on webpage
- 2D and 3D Transformation of HTML Elements
- Fast website development process (one css file can handle multiple html layout style)
Software Requirement
- Text Editor
- Browser
You can use any text / css editor, my recommendations are:
- Notepad
- Notepad++
- VS Code
- Sublime
- Dreamweaver
CSS Syntax
Selector {Property1:property1-value; Property2:property2-value;PropertyX:propertyX-value;}
or
Selector{
Property1: property1-value;
Property2: property2-value;
PropertyX: propertyX-value;
}
Selector - The selector points to the HTML element or HTML Tag you want to style. It is used to find or select HTML elements based on their element name, id, class and more.
Property - It indicates that these properties are defined for that element or selector.
Property-Value - These are values assigned to Properties.
Syntax:
Selector {Property1:property1-value; Property2:property2-value;PropertyX:propertyX-value;}
Example:
p{color:red;font-size:22px;}
p{
color:red;
font-size:22px;
}
Element Selector
The element selector selects elements based on the element name
Syntax:
Element Selector{
Property1: property1-value;
Property2: property2-value;
PropertyX: propertyX-value;
}
Example:
p{color:red;font-size:22px;}
h1{color:blue;font-size:22em;}

Comments
Post a Comment