CSS is the acronym of “Cascading Style Sheets”. Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS is used to control the style of a web document in a simple and easy way. CSS describes how HTML elements should be displayed. It allows us to add effects or animations to the website.
è CSS is a computer language
for laying out and structuring web pages (HTML or XML).
è This language contains coding elements and is composed of these “cascading style sheets” which are equally called CSS files
è CSS describes the presentation of a webpage including colors, layout and fonts.
Why we use CSS ?
è
CSS allows the
web designers to make their websites unique and attractive
è
It is a highly effective HTML tool that provides easy control over
layout and presentation of website pages by separating content from design.
è
CSS is easy to learn and understand but it provides powerful control
over the presentation of an HTML document.
è
It can control the layout of multiple
web pages all at once.External stylesheets are stored in CSS files.
Syntax
of CSS:
h1{
Background-color:red;
color:yellow;
Font-size: 12px;
}
Explanation:
è Here, h1 is called the selector. It is used to select the html elements which you want to style.
è The values declared inside the curly braces are called declarations which are terminated by semi-colon.
è The words before the colon determines the property name and after the colon are called values.
The below example of CSS will make you easier to understand the above code.
<!
Doctype html>
<html>
<head>
<title>css style</title>
<style>
h1{
Background-color:red;
color:yellow;
Font-size: 22px;
}
</style>
</head>
<body>
<h1> this is the example of CSS
style</h1>
</body>
</html>
Output
1 Comments
thank you sir for this information....plz keep it up
ReplyDelete