CSS Intro


Go to main Page

Intro

To Style oue webpage we use CSS

Ways to store CSS

    There are three ways to store CSS
  1. External CSS
  2. Inline CSS
  3. Internal CSS

What is External CSS?

External CSS means that we use CSS externally.

External CSS is defined within the <link> in the head tag with type and href attribute.

We make a file with .css extension


Example


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


Explaination

In type attribute, we define browser that is CSS and in href attribute, we define its address.

What is Inline CSS?

Inline CSS means that we use CSS in the line.

In Inline CSS we style the elements in a line.


Example


    
<h1 style="color:green; font-size:30px">Heading </h1>


Explaination

We use style and properties in a line to style it in internal CSS.


What is Internal CSS?

Internal CSS means that we use CSS internally.

In Inline CSS we style the elements in a single file with HTML but in head tag.

we use all styling in <style> tag.


Example


    
<!DOCTYPE html>
<html>
<head>
	<title></title>
<style>
	h1{
		color:red;
	}
</style>
</head>

<body>
<h1>Heading</h1>
</body>
</html>