Introduction:

In this article we are going to explain what is inline css tag in html or why use inline css in HTML or how to use inline css on web page with example.

Description:  

When we apply CSS directly in single html element that called inline CSS technique. The inline CSS is a method to insert a unique style directly in HTML element. The style attribute use to add css property.

If you want to use inline CSS, you should use the style attribute to the relevant tag.

Syntax:

<htmltag style="cssproperty1:value; cssproperty2:value;"> </htmltag>   

Example:

<!DOCTYPE html>
<html>
<head>
    <title>This is the example of style attribute</title>     
</head>
<body>
    <h1 style="color:blue;margin-left:30px;">This is a heading</h1>
</body>
</html> 

Output:

 

  how to use Inline CSS in html element

I hope this article will help to you after reading.

0 comments


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

you may also like