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.
image.html
<html>
<head>
<title>Font Style and Images</title>
<style>
li{
font-size: 20px;
color: #800000;
padding: 10px;
}
div{
margin: 10px;
padding: 10px;
border: 3px #800000 solid;
}
ul{
padding: 10px;
margin-left: 20px;
}
p{
font-size: 18px;
text-align: justify;
color: #3a3a3a;
}
</style>
</head>
<body bgcolor="#F4E5F7">
<center><h1>Font Style and Images</h1></center>
<div>
<h2>Font Style</h2>
<p>The <font> tag is used to display text in different fonts.</p>
<h3><font> tag has three attributes</h3>
<ol>
<li>face</li>
<li>size</li>
<li>color</li>
</ol>
<h3>Example</h3>
<p><font face="courier" size="20" color="blue">A text with a font style</font></p>
<h2>Image Tag</h2>
<p><img> tag is used to display images on the web page</p>
<h3><img> tag has several attributes</h3>
<ol>
<li>src (Mandatory)</li>
<li>alt</li>
<li>width</li>
<li>height</li>
</ol>
<h3>Example</h3>
<img src="back.jfif" alt="An Image" width="300" height="150"/>
<p></p>
</div>
<div>
<a href="home.html">Home</a>
</div>
<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/>
</div>
</body>
</html>
Output
The use of the Marquee Tag is available Next.
https://www.programmingempire.com/how-to-display-different-font-styles-on-a-web-page/
Further Reading
Evolution of JavaScript from ES1 to ES2020
Introduction to HTML DOM Methods in JavaScript
Understanding Document Object Model (DOM) in JavaScript
Understanding HTTP Requests and Responses
What is Asynchronous JavaScript?
JavaScript Code for Event Handling
- AI
- Android
- Angular
- ASP.NET
- Augmented Reality
- AWS
- Bioinformatics
- Biometrics
- Blockchain
- Bootstrap
- C
- C#
- C++
- Cloud Computing
- Competitions
- Courses
- CSS
- Cyber Security
- Data Science
- Data Structures and Algorithms
- Data Visualization
- Datafication
- Deep Learning
- DevOps
- Digital Forensic
- Digital Trust
- Digital Twins
- Django
- Docker
- Dot Net Framework
- Drones
- Elasticsearch
- ES6
- Extended Reality
- Flutter and Dart
- Full Stack Development
- Git
- Go
- HTML
- Image Processing
- IoT
- IT
- Java
- JavaScript
- Kotlin
- Latex
- Machine Learning
- MEAN Stack
- MERN Stack
- Microservices
- MongoDB
- NodeJS
- PHP
- Power Bi
- Projects
- Python
- Quantum Computing
- React
- Robotics
- Rust
- Scratch 3.0
- Shell Script
- Smart City
- Software
- Solidity
- SQL
- SQLite
- Tecgnology
- Tkinter
- TypeScript
- VB.NET
- Virtual Reality
- Web Designing
- WebAssembly
- XML