Other Formatting Tags
You can spice up the look of your text with special formatting elements. The can give your site some more structure as well as provide context for the information you're trying to convey.
Blockquote
If you're writing an article about people you've interviewed or a piece of literature it's often required to provide quotations from your source. HTML allows you to do this with the <blockquote> element.
A typical piece of blockquote text may look something like this:
<html>
<head>
<title>HTML for Beginners - Basic HTML</title>
</head>
<body>
<blockquote>
"To dismiss front-end design as mere 'icing'
is to jeopardize the success of any site."
— Curt Cloninger, 2001
</blockquote>
</body>
</html>
And will produce
"To dismiss front-end design as mere 'icing' is to jeopardize the success of any site." — Curt Cloninger, 2001
Preformatted Text
Preformatted text will retain the whitespace it's written with. This is useful if your text needs to be displayed exactly as you've written it, such as poetry.
A typical piece of preformatted text may look something like this:
<html>
<head>
<title>HTML for Beginners - Basic HTML</title>
</head>
<body>
<pre>Some
text
here</pre>
</body>
</html>
And will produce
Some text here
Code
This element is semantic because it exactly describes the text it's presenting. Only lines of computer code (HTML, Javascript, C, etc) should appear within the tags. Keep in mind that the default behavior of most browsers will show code in monospaced fonts (Courier, System, etc.). Each of the code blocks presented throughout this site is written within code tags.
A typical piece of code text may look something like this:
<html>
<head>
<title>HTML for Beginners - Basic HTML</title>
</head>
<body>
<p>
<code>Some programming language here</code>
</p>
</body>
</html>
And will produce
Some programming language here