Sure! Below is an example HTML snippet demonstrating various text formatting styles, including headings, bold, italic, underline, strikethrough, code formatting, superscript, subscript, blockquote, and different font colors and sizes. Additionally, I've included the user message you mentioned.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Formatting Example</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.underline {
text-decoration: underline;
}
.strikethrough {
text-decoration: line-through;
}
.code {
font-family: monospace;
background-color: #f4f4f4;
padding: 2px 4px;
border-radius: 4px;
}
.highlight {
background-color: yellow;
}
.small {
font-size: 0.8em;
}
.large {
font-size: 1.5em;
}
.red {
color: red;
}
.blue {
color: blue;
}
blockquote {
border-left: 4px solid #ccc;
margin: 1em 0;
padding-left: 1em;
color: #666;
font-style: italic;
background-color: #f9f9f9;
}
</style>
</head>
<body>
<h1>Welcome to the Formatting Example</h1>
<h2>Text Styles</h2>
<p>This is <b>bold</b> text.</p>
<p>This is <strong>strongly emphasized</strong> text.</p>
<p>This is <i>italicized</i> text.</p>
<p>This is <em>emphasized</em> text.</p>
<p>This is <span class="underline">underlined</span> text.</p>
<p>This is <span class="strikethrough">strikethrough</span> text.</p>
<p>This is <code class="code">inline code</code> formatting.</p>
<p>This is <mark class="highlight">highlighted</mark> text.</p>
<h2>Font Sizes and Colors</h2>
<p class="small">This text is small sized.</p>
<p class="large">This text is large sized.</p>
<p class="red">This text is red colored.</p>
<p class="blue">This text is blue colored.</p>
<h2>Special Formats</h2>
<p>Water is H<sub>2</sub>O.</p>
<p>E = mc<sup>2</sup></p>
<blockquote>This is a blockquote with some italicized text.</blockquote>
<hr />
<h2>User Message</h2>
<p><strong>First user says:</strong> this is a first users message</p>
</body>
</html>
This example covers a broad range of common HTML formatting techniques. Let me know if you want me to include any other special formats!