saftutorials.com
CSS Introduction
CSS is short name of Cascading Style Sheet. It's a style of HTML file.

If you learn at all of our CSS tutorials, However, a better way, you will know about CSS.

Kinds of CSS styles: There are three types of CSS style 1) Inline Style, 2) embedded styles, 3) External styles

The CSS full meaning is Cascading Style Sheet.

Inline Style structure

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>CSS Tutorials</title>
    </head>
<body style="background:#dddddd"> <!-- here use inline css -->
    <h1 style="color:green">HTML Heading</h1> <!-- here use inline css -->
    <p style="color:red">HTML Paragraph</p> <!-- here use inline css -->
</body>
</html>

 

Embeded Style structure

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>CSS Tutorials</title>
        <style>  <!-- here start define embeded css code -->
         body{
          background:#dddddd;
         }
          h1{
            color:green;
          }
          p{
            color:red;
          }
        </style>  <!-- here end define embeded css code -->
    </head>
<body>
    <h1>HTML Heading</h1>
    <p>HTML Paragraph</p>
</body>
</html>

 

external Style structure

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>CSS Tutorials</title>
        <link rel="stylesheet" type="text/css" href="styles.css"> <!-- here link embeded css code --> 
    </head>
<body> 
    <h1>HTML Heading</h1>
    <p>HTML Paragraph</p>
</body>
</html>
Find us on

Facebook Google Plus Twitter Pinterest YouTube

web statistic