Garv
Garv
Write the code in HTML using text formatting tags like font, font colour, font type,
bold, italics, superscript, subscript, underline, strong, align, deleted text etc. . Write the
code in HTML using text formatting tags like font, font colour, font type, bold, italics,
superscript, subscript, underline, strong, align, deleted text etc.
CODE :
<!DOCTYPE html>
<html>
<head>
<title>By Garv Gaba</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
line-height: 1.6;
background-color: #f5f5f5;
color: #333;
}
header {
background-color: blue;
color: white;
padding: 20px;
text-align: center;
}
main {
padding: 20px;
}
p{
margin-bottom: 10px;
}
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
.underline {
text-decoration: underline;
}
.strong {
font-weight: bold;
}
.sup {
vertical-align: super;
font-size: smaller;
1
}
.sub {
vertical-align: sub;
font-size: smaller;
}
.deleted {
text-decoration: line-through;
color: #d9534f;
}
.styled-text {
color: #007bff;
font-family: 'Courier New', Courier, monospace;
font-size: 1.2em;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
.left {
text-align: left;
}
</style>
</head>
<body>
<header>
<h1>By Garv Gaba</h1>
</header>
<main>
<p class="bold">This is a <span class="strong">strong</span> text example.</p>
<p class="styled-text">This is text with a different style: color, font family, and size.</p>
2
</main>
</body>
</html>
OUTPUT :