Inline CSS With Example

Inline Style Sheets:

Inline Style Sheets are included with HTML element i.e they are placed inline with the element to add inline CSS, we have to declare style attribute which can contain any CSS property.

An inline CSS is used to apply a unique style to a single HTML element

An inline CSS uses the style attribute of an HTML element.

An inline CSS style applies to a single element. The CSS code is written in the 'style' attribute of the HTML element that you want to apply that style to. For example, if you want your <h1> element to be in a blue color, you will write the inline CSS as follows:

inline CSS Example 1:

	 <h1 style="color:blue;">This is a Blue Heading</h1> 

	 

This is a Blue Heading


inline CSS Example 2:


Output :


Aimtocode, Tutorial!

Read Also: