CASCADING STYLESHEET

CSS is used to control the style of a web document in a simple and easy way. CSS stands for Cascading Style Sheets.SS is a language that describes the style of an HTML document. CSS describes how HTML elements should be displayed. CSS can be added to HTML elements in 3 ways:

 

  • INLINE
  • INTERNAL
  • EXTERNAL

INLINE CSS

INLINE By using the style attribute in HTML elements.

 

<p style=”color:blue”>Paragraph is blue color</p>

INTERNAL CSS

INTERNAL CSS By using the <style> element in <head> section

 

 

Example:

<head>
<style type="text/css">
body{
background-color:blue;
}
</style>
</head>

 

 

 

EXTERNAL CSS

EXTERNAL CSS By using external CSS Files.

 

Create an external stylesheet named mystyle.css  

It uses the <link> tag on every pages and the <link> tag should be put inside the head section.

 

 

Example:

<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

 

 

 

CSS BACKGROUND

It define the background effects for elements.

Css background properties are as follows :

 

  1. Background-color
  2. Background-image
  3. Background-repeat
  4. Background-attachment
  5. Background-position

Background colorThis property specifies the background color of an element.

 

Example:

body
{
   background-color:red;
}

Background ImageThis property specify an image to use as the background of an element. By default, the image is repeated so it covers the entire element.

 

Example:

body
{
   background-image : url("/myimage.jpg");
}

Background repeatBy default the background image property repeats the image both horizontally and vertically.

Example:

body
{
   background-image:url("/sun.jpg");
   background-repeat: repeat:x; 

/* background-repeat: repeat:y; vertical*/
}

Background-attachmentThis property is used to fix the background ground image.The image will not scroll with the page.

Example:

body
{
   background-attachment: fixed;
}

Background-positionThis property is used to set the image to a particular position.

Example:

body
{
   background-repeat:no repeat;
   background-position:right top;
}

DOWNLOAD LATEST PROJECTS

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

ezywebbuilding will use the information you provide on this form to be in touch with you and to provide updates and marketing.