Global style Attribute - HTML CSS HTML Global Attribute

HTML CSS examples for HTML Global Attribute:style

Description

The style attribute specifies an inline style for an element.

Attribute Values

Value Description
style_definitions One or more CSS properties and values separated by semicolons (e.g. style="color:blue;text-align:center")

The following code shows how to Use of the style attribute in an HTML document:

Demo Code

ResultView the demo in separate window

<!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><!--from   w w  w.  j  a v  a 2  s  .  com-->
</html>

Related Tutorials