Learn html - html tutorial - Style attribute in html - html examples - html programs
The style attribute defines an inline style for an element.
The style attribute will override any style set globally.
The style attribute is a part of the Global Attributes.
Syntax for style attribute in HTML:
<element style="style_definitions">
Differences Between HTML 4.01 and HTML5 for style attribute in HTML:
HTML 4.0.1
<base>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title> tags are not supported in HTML4.0.1.
HTML5
The style attribute can be used on any HTML element.
Applies to:
Elements
Attribute
All HTML Elements
style
Attributes Values of size attribute in HTML:
Value
Description
style_definitions
One or more CSS properties and values divided by semicolons
Sample coding for style attribute in HTML
Tryit<!DOCTYPE html>
<html >
<head>
<title> Wikitechy HTML style Attribute</title>
</head>
<body>
<h1 style="color:blue;text-align:center;"> Welcome to wikitechy.com
</h1>
</body>
</html>
Code Explanation for style attribute in HTML
style attribute used to define the style for the element.
The Background color sets by Cyan .
style="color:blue; text-align:center;" is used to set the color as blue and show the contents in center alignment for the <h1> tag.
Sample Output for style attribute in HTML
The style blue color and center alignment is applied to “Welcome to wikitechy.com” .
Browser Support for style attribute in HTML
Related Searches to style attribute in html
html style tag
html font family
html font bold
style font size
html font family list
html font color tag
font color html
html font size
html tutorials html editor html code html form html tutorial html color html color codes html table html img html5 html code for website html and css html programs html website free html editor html5 tutorial wysiwyg html editor html tutorial pdf html converter php tutorial html example html tutorial css tutorial html css html tags html basics code html html online html mailto html lang html tags list