Summary of Basic HTML Tags
Summary of Basic HTML Tags
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Body Elements
Lists
Preformatted text
<pre>
Bold <b>
Italics <i>
Underline <u>
Strong <strong>
Variable name <var>
Citation <cite>
Graphics
Entities
Headings
Headings are used to title sections and subsection of a document.
HTML has 6 levels of headings labelled h1, h2, ..., h6.
The first heading should be <h1>. item In many documents the first
heading is the same as the title.
Headings are displayed in larger/bolder fonts than normal body
text.
Increment headings linearly -- do not skip.
<html>
<head>
<title> HTML Heading Levels
</title>
</head>
<body>
<h1> This is a level 1 heading </h1>
<p>
This is not a heading. It is a paragraph.
</p>
<h2> This is a level 2 heading </h2>
<h3> This is a level 3 heading </h3>
<h4> This is a level 4 heading </h4>
<h5> This is a level 5 heading </h5>
<h6> This is a level 6 heading </h6>
</body>
</html>
Paragraphs
<p> ....</p> tag delimts a paragraph.
HTML ignores most carriage returns in a file.
Text is wrapped until a <p> or </p> encountered.
<p align=center>
<p align>
<!-- THIS IS A COMMENT -->
<!-- Default alignement is left -->
Left aligned paragraph
</p>
<p align = center>
Anchors
Anchors are special places within documents that can be linked to.
For Example:
<ul>
<li> apples.
<li> bananas.
</ul>
<ol>
<li> apples.
<li> bananas.
</ol>
1. apples.
2. bananas
Nesting Lists
Lists of the same or different type may be nested in any number of ways. For Example:
<ul>
<li> Some fruit:
<ul>
<li> bananas.
</ul>
<li> Some more fruit
<ul>
<li> oranges.
</ul>
</ul>
Some fruit:
o bananas.
o oranges.
In-Line Images
Most browsers can display in-line images that are in JPEG or GIF format. Use the img
tag with src attribute to include an image in you HTML page:
<img src=image_link>
where image_link is the the relative, absolute or remote URL link of the image file.
Example:
<p align = center>
An image mixed in with text <br>
<img src="Images/gromit.gif" align=middle
alt="wallace and gromit">
</p>
Which looks like this when viewed from a browser:
External Images, Sounds, Video
External Images will be loaded into their own page. The href field within the anchor tag is
used.