HTML Quick Reference: Elements Restricted To The Head Element
HTML Quick Reference: Elements Restricted To The Head Element
HTML is composed of a set of elements that define a document and guide its display. An HTML
element may include a name, some attributes and some text or hypertext, and will appear in an HTML
document as
For example:
<html> . . . </html>
that is, in turn, composed of head and body elements:
<head> . . . </head>
and
<body> . . . </body>
To allow older HTML documents to remain readable, <html>, <head>, and <body> are actually optional
within HTML documents.
Text Elements
<p> The end of a paragraph that will be formatted before it is displayed on the screen
<pre> . . . </pre>
Identifies text that has already been formatted (preformatted) by some other system and must be
displayed as is. Preformatted text may include embedded tags, but not all tag types are permitted.
Attribute: width
<listing> . . . </listing>
Example computer listing; embedded tags will be ignored, but embedded tabs will work
<plaintext>
<blockquote> . . . </blockquote>
Include a section of text quoted from some other source.
Hyperlinks or Anchors
<a name="target_anchor_name"> . . . </a>
Define a target location in a document
<a href="#anchor_name"> . . . </a>
Link to a location in the same file
<a href="URL"> . . . </a>
Link to another file
<a href="URL#target_string"> . . . </a>
Link to a target location in another file
resource_type://host.domain:port/pathname
where the possible resource types include: file, http, news, gopher, telnet, and wais, and the colon
followed by the TCP port number is optional. A more complete description is presented in
http://www.w3.org/hypertext/WWW/Addressing/Addressing.html
Headers
<h1> . . . </h1>
Most prominent header
<h2> . . . </h2>
<h3> . . . </h2>
<h4> . . . </h4>
<h5> . . . </h5>
<h6> . . . </h6>
Least prominent header
Logical Styles
<em> . . . </em>
Emphasis
<strong> . . . </strong>
Stronger emphasis
<code> . . . </code>
Display an HTML directive
<samp> . . . </samp>
Include sample output
<kbd> . . . </kbd>
Display a keyboard key
<var> . . . </var>
Define a variable
<dfn> . . . </dfn>
Display a definition
<cite> . . . </cite>
Display a citation
Physical Styles
<b> . . . </b>
Bold font
<i> . . . </i>
Italics
<u> . . . </u>
Underline
<tt> . . . </tt>
Typewriter font
The <dl> attribute compact can be used to generate a definition list requiring less space.
Entities
&keyword;
Display a particular character identified by a special keyword. For example the entity &
specifies the ampersand ( & ), and the entity < specifies the less than ( < ) character. Note that
the semicolon following the keyword is required, and the keyword must be one from the list
presented in http://www.w3.org/hypertext/WWW/MarkUp/Entities.html
&#ascii_equivalent;
Use a character literally. Again note that the semicolon following the ASCII numeric value is
required.
<!-- text -->
Place a comment in the HTML source
<address> . . . </address>
Present address information
Michael Grobe
Academic Computing Services
The University of Kansas
[email protected]