used to control the style of a web document in a simple and easy way.
CSS (Cascading Style Sheet)
CSS is the acronym for?
Cascading Style Sheet
Enumerate the key advantages of learning css:
Create Stunning Website
If you want to start a career as a professional web designer, HTML and CSS designing is a must skill
Become a web designer
Control web
Once you understands the basic of HTML and CSS then other related technologies like javascript, php, or angular are become easier to understand.
Learn other languages
What is the output of this?
<!DOCTYPE html>
<html>
<head>
<title>This is document title</title>
<style>
h1 {
color: red;
}
</style>” Hello World! “ ( the text color is red)
Enumerate the application of css:
You can write CSS once and then reuse same sheet in multiple HTML pages.
CSS saves time
To make a global change, simply change the style, and all elements in all the web pages will be updated automatically.
Easy maintenance
If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag.
Pages load faster
Superior styles to HTML
Style sheets allow content to be optimized for more than one type of device.
Multiple Device Compatibility
Global web standards
an HTML tag at which a style will be applied.
selector
A type of attribute of HTML tag which cover all the HTML attributes are converted into CSS properties.
Property
assigned to properties. An example is color property can have value either red
Values
syntax of CSS rules:
selector { property: value }
syntax that selects all the elements in a document
*{ color:red;}
selects all the elements in a document
Universal Selector
syntax that selects all elements that match selector
ul {color:red; }
Selects all elements that match selector
Type selector
syntax selects elements whose id attribute’s value matches the selector
intro { color=red; }
elements whose class attribute's value is "side."
elements that are direct children of a
element after an
elements that are siblings of an
elements on the page will be center-aligned, with a red text color:
CSNHS Web Programming
Senior High School
CSNHS Web Programming
Senior High School
CSS: #first { font-size: 40px; color: green; text-align: center; } #second { font-size: 30px; color: red; }