It is an important feature of CSS that it can be added by various ways in a webpage.
There are three ways of inserting a style sheet:
Using the style attribute in the HTML start tag.
Using the style Using the <style> tag within the code of the webpage.
Using the <link> tag to link an external CSS file in the webpage.
Inline CSS is used to apply CSS directly on a single element. It can apply the unique style by
putting the CSS directly into the start tag of a particular element. The style attribute is used to give inline CSS.
<title> Inline CSS </title>
<h1 style="color:red; font-size:30px;">This is a heading</h1>
<p style="color:green; font-size:22px;">This is a paragraph.</p>
<div style="color:blue; font-size:14px;">This is some text content.</div>
Inline CSS Examples
This is a heading
This is a paragraph.
This is some text content.
It is used when we want to give styling to the whole webpage at once.
It's scope is limited to the only webpage it is written in.
Although it can be written anywhere in the page within <style> tag but is preferred within head section of html.