How to Change Font Color in HTML, How to Change Font Style, Font Size and Font Color in HTML


How to Change Font Color in HTML, How to Change Font Style, Font Size and Font Color in HTML



In HTML, there are many ways to change the Font properties like font color, font size, font weight, font style etc.
I am showing you the some ways to change the font properties in HTML

The first way to change the Font Properties:-
The <font> tag

<html>
<head>
<title>Changing Font of a Label</title>
</head>
<body>
<center>
<font color="red" size="7" face="Curlz MT">This is a Sample Font</font>
</center>
</body>

</html>

The second way to change the Font Properties:-
The style attribute of any tag

<html>
<head>
<title>Changing Font of a Label</title>
</head>
<body>
<center>
<div style="color:red;font-size:20px;font-family:Curlz MT;font-weight:bold">This is a Sample Font</div>
</center>
</body>

</html>

The third way to change the Font Properties:-
The <style>tag

<html>
<head>
<title>Changing Font of a Label</title>
<style type="text/css">
div
{
color:red;
font-size:20px;
font-family:Curlz MT;
font-weight:bold;
}
</style>
</head>
<body>
<center>
<div>This is a Sample Font</div>
</center>
</body>

</html>

I a sure the above examples definitely helps you.


Thanks for visiting.

{ 0 comments... read them below or add one }

Post a Comment