font tag in html with examples





  1. The <font> tag specifies the font face, font size, and font color of text.
  2. The HTML element <font> is an inline element. It is deprecated in HTML 4.0 in favor of cascading style sheets. The reason for this is simple: CSS (cascading style sheets) give you much more flexibility and many more styling options than the FONT element. There are six sizes that can be used with the FONT SIZE tag. 
  3. Font Size 7 is the largest, and Font Size 1 is the smallest. 
  4. The default size for type to display on a web page is Size 3. 
  5. The <font> tag is supported in all major browsers.


Example :

     <html>
     <head>
     <title>Font</title>
     </head>
     <body>
     <p><font size="20" color="green" face="comic sans ms">This is 99codingexamples.</font></p>
     <p><font size="25" color="red" face="courier">Powered by kk.</font&gt</p>
     </body>
     </html>
     

Demo :




In the above example, we have used font tag.


font and Style :


<html>
<head>
<title>FontStyle</title>
<style type="text/css">
font
{
color:green;
font-size:20px;
font-family:comic sans ms;
}
</style>
</head>
<body>
<p><font>This is 99codingexamples.</font></p>
<p><font>Powered by kk.</font></p>
</body>
</html>

Demo :




In the above example, we have rendered font element. We have also applied CSS to it.



0 comments:

Post a Comment