How to use Style Attribute in HTML5

In this article I am going to explain about Style attribute.
  • 1999

Style Attribute in HTML5

Style attribute use for specify inline style for an element in Html document. With style attribute we can set different type of properties. example color, font style, border, height, width etc. In HTML5 style attribute can be on any element.

Browser that supports Style Attribute.

Internet explorer, Mozilla firefox, Google chrome, opera and Safari browsers.


<ElementName style="style-properties">




    <h3 style="color: red; text-align: left">

        Style Attribute</h3>

    <button style="background-color: Green; height: 30px; width: 50px">






Further Readings

You may also want to read these related articles: here
Ask Your Question 
Got a programming related question? You may want to post your question here


© 2020 DotNetHeaven. All rights reserved.