HTML Style Tag | 99Codes

HTML Style

html style

 

Example -


I am Red

I am Blue

I am Big

The HTML Style Attribute -


Setting the style of a HTML component, should be possible with the style characteristic.

The HTML Style Attribute has the following Syntax -


< tagname style="property:value;" >


The Property is a CSS property.The Value is a CSS value.(The more information in CSS Tutorial)


 HTML Background Color -

The Background-color property characterizes the foundation shading for a HTML component.

This precedent sets the foundation shading for a page to powderblue:

Example -


<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>


HTML Text Color -


The shading property characterizes the content shading for a HTML component:

Example -


<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>


HTML Fonts -

 

The textual style family property characterizes the text style to be utilized for a HTML component:

Example -


<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>


HTML Text Size -

html text size


The text dimension property characterizes the content size for a HTML component:

Example  -


<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>


HTML Text Alignment -

html text alignment


The text-align property characterizes the content size for a HTML component:

Example -


<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>


Chapter Summary


Use the style Attribute for Styling HTML Elements


HTML Style Tag | 99Codes HTML Style Tag | 99Codes Reviewed by Arup Roy on February 23, 2019 Rating: 5

No comments:

Powered by Blogger.