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>