bestwebdesign

Freelancign web design and Graphics design

Sunday 10 December 2017

How to use it css

How to use it css

Three Ways to Insert CSS

  1. External style sheet
  2. Internal style sheet
  3. Inline style

External Style Sheet

With an external style sheet, you can change the look of a whole site by changing only one document!

Each page must incorporate a reference to the external style sheet document inside the <link> component. The <link> component goes inside the <head> segment:

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Yourself Try

Internal Style Sheet

An internal style sheet might be utilized on the off chance that one single page has a special style.

Internal styles are characterized inside the <style> component, inside the <head> area of a HTML page:

Example

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

h1 {
    color: maroon;
    margin-left: 40px;
}
</style>
</head>
Yourself Try

Inline Styles

An inline style might be utilized to apply an interesting style for a single element.

To utilize inline styles, add the style ascribe to the pertinent element. The style trait can contain any CSS property.

The case beneath demonstrates to change the shading and the left edge of a <h1> element:

Example

<h1 style="color:blue;margin-left:30px;">This is a heading</h1>
Yourself Try




Wright © bestwebdesign and Graphics design

Share:

0 comments:

Post a Comment


Web Design Tutorial

Theme Support

Munere veritus fierent cu sed, congue altera mea te, ex clita eripuit evertitur duo. Legendos tractatos honestatis ad mel. Legendos tractatos honestatis ad mel. , click here →