Horje
HTML style Attribute

Definition and Usage

The style attribute specifies an inline style for an element.

The style attribute will override any style set globally, e.g. styles specified in the <style> tag or in an external style sheet.


Applies to

The style attribute is part of the Global Attributes, and can be used on any HTML element.

Element Attribute
All HTML elements style

Browser Support


How to Use of the style attribute in an HTML document - HTML style Attribute

Style of This is a header and This is a paragraph.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1 style="color:blue;text-align:center;">This is a header</h1>
<p style="color:green;">This is a paragraph.</p>

</body>
</html>

Output should be:

How to Use of the style attribute in an HTML document - HTML style Attribute




html style attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference