The following example code demonstrates How to Display Different Font Styles on a Web Page.

How to Create a Multi-Page Document in HTML

When we don’t want to use CSS for styling fonts, we can use the <font> tag. We can use the font tag to specify the font type, color, and size. As can be seen, the <font> tag is used in this example. Also, the <img> tag is also described. We use the <img> tag to display an image. Furthermore, the important attributes of the <img> tag are src, alt, width, and height. In order to display the image, src attribute is necessary. Whereas, other attributes are optional.


     <title>Font Style and Images</title>
             font-size: 20px;
             color: #800000;
		 padding: 10px;
		margin: 10px;
		padding: 10px;
            border: 3px #800000 solid;
		padding: 10px;
            margin-left: 20px;            
          font-size: 18px;
          text-align: justify;
          color: #3a3a3a;
  <body bgcolor="#F4E5F7">
      <center><h1>Font Style and Images</h1></center>
           <h2>Font Style</h2>
           <p>The &lt;font&gt; tag is used to display text in different fonts.</p>
           <h3>&lt;font&gt tag has three attributes</h3>
           <p><font face="courier" size="20" color="blue">A text with a font style</font></p>
           <h2>Image Tag</h2>
           <p>&lt;img&gt tag is used to display images on the web page</p>
           <h3>&lt;img&gt tag has several attributes</h3>
               <li>src (Mandatory)</li>
           <img src="back.jfif" alt="An Image" width="300" height="150"/>
          <a href="home.html">Home</a>
      <div style="padding: 20px;">
          <a href="formatting.html">Formatting Tags</a><br/>
          <a href="marquee.html">Marquee</a><br/>
          <a href="othertags.html">Other Tags</a><br/>


An Example Demonstrating How to Display Different Font Styles on a Web Page
An Example Demonstrating How to Display Different Font Styles on a Web Page

The use of the Marquee Tag is available Next.

Further Reading

Evolution of JavaScript from ES1 to ES2020

Introduction to HTML DOM Methods in JavaScript

JavaScript Practice Exercise

Understanding Document Object Model (DOM) in JavaScript

Understanding HTTP Requests and Responses

What is Asynchronous JavaScript?

JavaScript Code for Event Handling


IITM Software Development Cell