CSS Introduction

Posted on November 3, 2019 By

CSS Introduction is description about CSS.

CSS stands for Cascading Style Sheets.

CSS used for design web page contents to display on screen of web browser.

It make HTML document more attractive and user friendly.

It is used for make different layout designs and variations in display content on different devices and screen sizes.

You can use css as internal or from external file.

Filename extension used for CSS is: .css (.css file used as external file)

Example:

<!DOCTYPE html>
<html>
	<head>
		<title>CSS Introduction</title>
		<style>
		h2{
			color:white;
			background-color:grey;			
		}
		p{
			color:green;
            border:1px solid black;
		}
		</style>
        <link rel='stylesheet' href='css/style.css' type='text/css'/>
	</head>
	<body>
		<h2>CSS Example</h2>
		<p>This is Paragraph.</p>
	</body>
</html>

Output:

CSS Example

This is Paragraph.

Description

Description for CSS Introduction example is given below.

Inline CSS

<style> : This tag is used for add css in HTML document. All css must be written between <style> tags. CSS written between <style> tag is called inline css.

Extenal CSS

To use css from outer file external file included in <head> of HTML document.

<link> : This tag is used for get css from external files. syntax is same as shown in example, just to change path of file in “href” attribute. Enter full path of your external css file where it locate in your file directory structure.

To know detail about other tags of HTML document refer here.

Category: CSS

Leave a Reply

Your email address will not be published. Required fields are marked *