CSS

What is CSS?

  • CSS stands for Cascading Style Sheets
  • CSS describes how HTML elements are to be displayed on the (browser) screen
  • CSS can control the layout of multiple web pages all at once

The CSS specifications are maintained by the World Wide Web Consortium (W3C).

Type of CSS

  • External style sheet
  • Internal style sheet
  • Inline style

External Style Sheet Syntax

<head>

<link rel=”stylesheet” type=”text/css” href=”style.css”>

</head>


Internal style sheet Syntax

<head>
<style>
body {
background-color: red;
}

h1 {
color: green;
margin-right: 50px;
}
</style>
</head>


Inline Style Sheet Syntax

<h1 style=”color:greeb;margin-left:30px;”>This is a inline style sheet</h1>