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

Notes-Types of CSS

The document explains the three types of Cascading Style Sheets (CSS): Internal, Inline, and External CSS. Internal CSS is defined within the <style> element in the HTML document's <head> section, Inline CSS applies styles directly within HTML tags, and External CSS is linked from a separate file using the <link> element. Examples of each type are provided to illustrate their usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views2 pages

Notes-Types of CSS

The document explains the three types of Cascading Style Sheets (CSS): Internal, Inline, and External CSS. Internal CSS is defined within the <style> element in the HTML document's <head> section, Inline CSS applies styles directly within HTML tags, and External CSS is linked from a separate file using the <link> element. Examples of each type are provided to illustrate their usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Cascading Style Sheet (CSS)

Types of CSS
→Internal CSS
→Inline CSS
→External CSS
Internal Style Sheet
• An internal style sheet may be used if one single HTML page has a
unique style.
• Internal CSS is defined within the <style> element in the HTML
document's <head> section.

<!DOCTYPE html>
<html>
<head>
<style>
p{
background: linen;
font-family:Calibri;
}
H1 {
color: maroon;
text-align:center;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Inline CSS
• used to apply a unique style for a single HTML element.
• It uses the style attribute.
• Inline CSS is applied directly within the HTML tags using the style
attribute.

External CSS
• External CSS is defined in a separate CSS file and then linked to the
HTML document using the <link> element.
Attributes:
• Rel: type of file
• Href: Path of the file/file name
<link rel=”stylesheet” href=mystyle.css>

You might also like