0% found this document useful (0 votes)
2 views2 pages

Css Introduction

CSS, or Cascading Style Sheets, is used to style web pages by defining their design, layout, and display variations for different devices. There are three methods to include CSS in a document: Internal CSS using <style> tags, External CSS via a linked stylesheet, and Inline CSS directly within HTML elements. Each method allows for different levels of control over the styling of web content.

Uploaded by

amitkumar378298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Css Introduction

CSS, or Cascading Style Sheets, is used to style web pages by defining their design, layout, and display variations for different devices. There are three methods to include CSS in a document: Internal CSS using <style> tags, External CSS via a linked stylesheet, and Inline CSS directly within HTML elements. Each method allows for different levels of control over the styling of web content.

Uploaded by

amitkumar378298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CSS

CSS stands for Cascading Style Sheets.

CSS is used to define styles for your web pages, including the design,
layout and variations in display for different devices and screen sizes.

Including CSS in a document


There are three ways of inserting a style sheet:

1. Internal CSS
CSS can be included in a document by using embedded style
sheets, which are included between <style> and </style> tags
directly in an HTML document.
These tags must appear between the <head> and </head> tags.

<style type=”text/css”>
body {
font-size:15px ;
background-color: linen;
}
H1{
font-color:red;
}
</ style >

2. External CSS
With an external style sheet, you can change the look of an entire
website by changing just one file.

CSS can be included in its own document and linked to an HTML


document by using the <link> element.
<link rel=”stylesheet” type=”text/css” href=”demo.css” />

3. Inline CSS

CSS declarations can be applied directly to an element in an HTML

document by using inline styles with the style attribute.

Code :

<html>

<head>

<title> Example of inline css </title>

</head>
<body>

<h1 style="color:blue;text-align:center;">This is a heading</h1>


<p style="color:red;">This is a paragraph.</p>

</body>
</html>

You might also like