Css and its types

MansiMahadik1 499 views 8 slides Sep 17, 2018
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

Easy way to learn basics of CSS


Slide Content

CSS { Cascading Style Sheet} & its Types

2 What Is CSS CSS stands for Cascading Style  Sheets CSS describes how HTML elements are to be displayed on screen, paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages all at once

CSS Syntax 3 { color: blue; font-size: 12px; } Declaration Declaration Property Property Value Value

Types Inline styles Embedded styles (Internal) Linked styles (External) 4

Inline Styles An inline style may be used to apply a unique style for a single element. To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property . < h1 style="color:blue;margin-left:30px;">This is a heading</h1> Syntax

Embedded Styles (Internal ) An internal style sheet may be used if one single page has a unique style. Internal styles are defined within the <style> element, inside the <head> section of an HTML page 6 Syntax <style> body {     background-color: linen; } h1  {     color: maroon;     margin-left: 40px; }  </style>

Linked Styles (External ) With an external style sheet, you can change the look of an entire website by changing just one file! Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the <head> section 7 Syntax < link rel="stylesheet" type="text/css" href="mystyle.css">

8 Thanks!