Introduction To CSS: By:-Swarnim Gottlieb Prince Ramanan
Introduction To CSS: By:-Swarnim Gottlieb Prince Ramanan
To :-
By:- Swarnim Gottlieb
Mr.Sanju Mahawar Sir Prince Ramanan
What Is CSS ??
Cascading Style Sheet(CSS)
• A Cascading style sheet(CSS) is a web page derived from multiple sources with a
defined order of precedence where the defmition of any style element conflict.
• CSS saves a lot of work
• CSS define how HTML elements are to be displayed
Syntax Of CSS
• A CSS rule set consist of a selector and a declaration block.
1. Internal(Embedded) Styles
2. Inline Styles
Internal styles are placed inside the head section of a particular web page via the style
tag. Internal styles are also called "Embedded" styles . Inline Styles
Inline styles are placed directly inside an HTML element in the code.
External Styles An external style sheet is a separate page which is then linked to the web
page.
CSS Color Font Style
<!DOCTYPE html>
<html>
<head>
<style>
• The CSS color property defines
h1 {
the text color to be used
color: blue;
font-family: verdana;
• The CSS font-family property defines the font font-size: 300%;
to be used. }
p {
color: red;
• The CSS font-size property defines the text
size to be used. font-family: courier;
font-size: 160%;
}
</style>
</head>
<body>
<h1></h1>
<p>.</p>
</body>
</html>
CSS Border
p {
border: 2px solid powderblue;
}
CSS Padding
The CSS padding property defines a padding (space) between the text and the border.
p {
border: 2px solid powderblue;
padding: 30px;
}
»
CSS Margin
• p {
border: 2px solid powderblue;
margin: 50px;
}
• THANK YOU