HTML Style Attribute Code For Website - Learn About Website | DaddyFile

0

The HTML Style Attribute Explain

Setting the style of an HTML element, can be done with the style attribute.
The HTML style attribute has the following syntax.

style="property:value;"

The property is a CSS property. The value is a CSS value.



Html Code:

<!DOCTYPE html>
<html>
<body>

<h2 style="color:red;">I am red</h2>
<h2 style="color:blue;">I am blue</h2>

</body>
</html>



Html Code Result:

I am red

I am blue

Post a Comment

 
Top