HTML CSS examples for HTML Global Attribute:style
The style attribute specifies an inline style for an element.
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:
<!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>