0% found this document useful (0 votes)
5 views4 pages

Css Intro

Css intro

Uploaded by

gunter99gunter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
5 views4 pages

Css Intro

Css intro

Uploaded by

gunter99gunter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

CSS (CASCADING STYLE SHEET)

CSS
CSS stands for Cascading Style Sheets. CSS describes how HTML elements are to be
displayed ·
In Css display commands are passed to the opening tag of an HTML element. The
commands are grouped as an attribute called STYLE
A Simple HTML element code with the STYLE attribute look like this.

<p style=""> simple line of code</p>

Commands in CSS are called DECLARATION

The declarations are placed in between the two quotes in the style attribute.

<p style="color: red;"> simple line of code </p>

<!DOCTYPE html>
<html>
<head>
</head>

<body>
<p
style="font-weight: bold;
font-size: 34px;">
This was written with a paragraph style tag
</p>

</body>
</html>
DECLARATION BASIC RULES

Declaration is a complete set of command without the semi colon


or closing.

<h1 style="color:blue;"> one declaration</h1>


<h1 style="color:blue; font-size:12px;"> two declaration</h1>
<h1 style="color:blue; font-size:12px; text-align:center"> three
declaration</h1>

Declarations are made up of PROPERTY AND VALUE.

Property tells the browser the category a particular style is.

Value further specifies the property. ie: size,

Property and value are separated by colon :


After a Declaration a semi colon is used to close the declaration.

STEPS:
Go to the opening tag of the HTML element you want to style.
Add the style attribute
Input the declaration/COMMAND (properties and value seprated by

NOTE:
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.

You might also like