Babitha3.css

4
Introduction About CCS Cascading Style Sheets (CSS) is a fantastic tool to add layout to your websites. It can save you a lot of time and it enables you to design websites in a completely new way. CSS is a must for anyone working with web design. Using CSS requires basic experience with HTML. 

Transcript of Babitha3.css

Page 1: Babitha3.css

Introduction About CCS

Cascading Style Sheets (CSS) is a fantastic tool to add layout to your websites. It can save you a lot of time and it enables you to design websites in a completely new way. CSS is a must for anyone working with web design.

Using CSS requires basic experience with HTML. 

Page 2: Babitha3.css

The basic CSS syntax

Let's say we want a nice red color as the background of a webpage:

Using HTML we could have done it like this:

<body bgcolor="#FF0000">With CSS the same result can be achieved like this:body {background­color: #FF0000;}

Page 3: Babitha3.css

Method 1: In­line (the attribute style)

One way to apply CSS to HTML is by using the HTML attribute style. Building on the above example with the red background color, it can be applied like this:

<html>  <head>    <title>Example</title>  </head>  <body style="background­color: #FF0000;">    <p>This is a red page</p>  </body></html>

Page 4: Babitha3.css

Method 2: Internal (the tag style)

Another way is to include the CSS codes using the HTML tag <style>. For example like this:

<html>  <head>    <title>Example</title>    <style type="text/css">      body {background­color: #FF0000;}    </style>  </head>  <body>    <p>This is a red page</p>  </body></html>