Styled Text
Headings
Element: <h1>, <h2>, <h3>, <h4>, <h5>, <h6> Start tag: required End tag: required Attributes: id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
Headings are an easy way to make big and small text. They can only be placed between
the <body> and </body> tags. There are six
different Heading tags: <h1>, <h2>,
<h3>, <h4>, <h5>, and
<h6>. <h1> being the largest and
<h6> the
smallest. As with all HTML tags you must close them. The tag for closing
<h1> is </h1>, <h2> ends with
</h2> etc.
<html>
<head>
<title>Headings in HTML</title>
</head>
<body>
<h1>This is the Largest Heading</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>This is the Smallest Heading</h6>
</body>
</html>
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Author's Address
Element: <address> Start tag: required End tag: required Attributes: id, class, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
The <address> tag is used to identify information concerning the
author of the webpage. Information could include: email address, webpage address,
phone number, street address, etc.
<address>
<a href="mailto:webmaster at sbrady dot com">Scott Brady</a>
<a href="http://www.sbrady.com/"> http://www.sbrady.com/</a>
$Date: May 21st 98 20:34:09 EST $
</address>
Align: left, right, center
Element: <div>, <span> Start tag: required End tag: required Attributes: id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
The <div> tag is a block-level tag that can be used with CSS
to style your documents. It is preferably used for document layout and not simple
styling due to the fact that it is block-level. The <span> tag on the
other hand is an inline tag and therefore better suited for styling text.
Because the <center> tag and the align attribute
have been deprecated in HTML 4.0 you need to use CSS to set alignment.
Horizontal alignment in HTML 4.0 is set with the text-align CSS property.
<div style="text-align: left">This text is aligned to the left</div>
<div style="text-align: center">This text is centered</div>
<div style="text-align: right">This text is aligned to the right</div>
<span style="text-align: left; color: red">This text is styled red and aligned to the left</span>
This text is aligned to the left
This text is centered
This text is aligned to the right
This text is colored red and aligned to the left
Del, Ins
Element: <del>, <ins> Start tag: required End tag: required Attributes: cite, datetime. id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
<del> and <ins> let you delete and insert data,
respectively. The user agent will most likely style the text in some way to make it known
that it has been changed. Attributes are <cite> and <datetime>.
<cite> is used to supply a URL to a document explaining the correction.
<datetime> is used to specify the date and time that the correction was
made.
We have <del>4</del><ins>6</ins> files.
We have46 files.
Big, Small, Sub, Sup, Bold, Italics, and Teletype
Element: <big>, <small>, <sub>, <sup>, <b>, <i>, <tt> Start tag: required End tag: required Attributes: id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
The <big> tag makes text larger, the <small>
tag makes text smaller, the <sub> tag makes subscript text,
<sup> makes superscript text. You can also make your text bold, italic, or teletype (in a monospace fond like a typewritter). The tags for doing this are <b>, <i>, and
<tt>.
<big>This is Big</big>
<small>This is Small</small>
This is <sub>Sub</sub> text
This is <sup>Sup</sup> text
<b>This is bold</b>
<i>This is italicized</i>
<tt>This is teletype</tt>
This text is Big
This text is Small
This is Sub text
This is Sup text
Bold
Italic
Teletype
Blockquote and Quote
Element: <blockquote>, <q> Start tag: required End tag: required Attributes: cite. id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
The <blockquote> and <q> tags are used to
present large blocks of quoted text. The attribute <cite=""> is used
to supply a URL where more information on the quote can be found.
<blockquote cite="path/to/page.html">
<p>"Anyone who slaps a 'this page is best viewed with Browser X' label on a
Web page appears to be yearning for the bad old days, before the Web, when you had very
little chance of reading a document written on another computer, another word
processor, or another network."
-Tim Berners-Lee in Technology Review, July 1996</p>
</blockquote>
<p><q cite="path/to/page.html">Anyone who slaps a <q>this page is best viewed with Browser
X</q> label on a Web page appears to be yearning for the bad old days, before
the Web, when you had very little chance of reading a document written on another
computer, another word processor, or another network.</q>
-Tim Berners-Lee in Technology Review, July 1996
</q>
"Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network." -Tim Berners-Lee in Technology Review, July 1996
Anyone who slaps a-Tim Berners-Lee in Technology Review, July 1996this page is best viewed with Browser Xlabel on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.
Preformatted Text
Element: <pre> Start tag: required End tag: required Attributes: id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
The <pre> tag lets you display your text exactly the way it is
in your html document. Any 'white space' will be rendered in the browser, and all
text will be monospaced font much like Courier. Some browsers will let you suggest
the width of the text block with the attribute width="".
<pre>
This text is preformatted
So is this</pre>
This text is preformatted So is this
Types of Text
Element: <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, <var>, <cite>, <abbr>, <acronym> Start tag: required End tag: required Attributes: id, class, lang, dir, title, style, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, more attribute info here.
All of these tags are used to define or style different types of text.
<em> will emphasis text in italics. <strong>
will make emphasised strong text that is bold. <dfn> makes the
text a defining instance of the enclosed term. <code> is for
fragments of computer code and makes the text a monospaced font.
<samp> is for sample output from programs, scripts, etc and makes
text a monospaced font. <kbd> is for text to be entered by the
user and makes text a monospaced font. <var> in for an instance of
a variable or program argument and makes the text italic. <cite> is
for a citation or a reference to other sources. <abbr> is for an
abbreviated form (e.g. WWW, HTTP, URL, etc.). <acronym> is for an
acronym (e.g., sonar, modem, etc.).
<em>em text - italics</em>
<strong>strong text - bold</strong>
<dfn>dfn text</dfn>
<code>code text - monospaced font</code>
<samp>samp text - monospaced font</samp>
<kbd>kbd text - monospaced font</kbd>
<var>var text - italic</var>
<cite>cite text - italic</cite>
<abbr>abbr text</abbr>
<acronym title="Modulator-Demodulator">modem</acronym>
em text - italics
strong text - bold
dfn text
code text - monospaced font
samp text - monospaced font
kbd text - monospaced font
var text - italic
cite text - italic
abbr text
modem
