HTML style attribute and its properties

<html>
<head>
<title> STYLE attribute and its properties</title>
</head>
<body>

this will have a blue background
<h1 style=”color:blue;”>This is a heading</h1>
<p style=”color:red;”>This is a paragraph.</p>

<h1 style=”font-family:verdana;”>Font verdana</h1>
<p style=”font-family:courier;”>courier</p>

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

<h1 style=”text-align:right;”>Central Heading</h1>
<p style=”text-align:center;”>Central paragraph.</p>

</body>
</html>

 

See in info on the code below

SHORT video on STYLE attribute and it’s properties

Demonstration with code

Copy the code from the link in the description

<body>

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

</body>

Text color

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

FONT FAMILY

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

FONT SIZE

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

Alignment

<h1 style=”text-align:right;”>Central Heading</h1>
<p style=”text-align:center;”>Central paragraph.</p>

<p>This is <sup>superscripted</sup> text.</p>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *