What is HTML?

Hyper Text Markup Language

Create your first HTML Page!

You've just hand wrote your own HTML page! Don't you feel cool??


HTML Basics


Basic HTML Tags

Headings

Heading tags are used to identify the HTMLs, yes you guessed it, Headings. They range from level 1 to 6, with 1 being the largest.

<h1>Heading 1</h1>

<h2>Heading 2</h2>

<h3>Heading 3</h3>

<h4>Heading 4</h4>

<h5>Heading 5</h5>
<h6>Heading 6</h6>

As you can see the header tags automatically add a new blank line after the heading.

Add at least two headings to your first HTML page.


Paragraphs

The paragraph tag, <p> is used to identify a paragraph by placing a new blank line after the </p> tag.


Line Breaks

the <br> tag tells the browser to start a <br>
new line.


Lists

There are two main types of lists in HTML, the ordered and unordered lists. Lists are actually defined by two diffirent tags, the first identifies the start of the list and what type of list it is. The other identifies the list items themselves.

<ul>
<li>I'm a list item</li>
<li>I'm another list item</li>
</ul>

Looks like

<ol>
<li>I'm a list item</li>
<li>I'm another list item</li>
</ol>

Looks like

  1. I'm a list item
  2. I'm another list item

Add a list of your favorite website (at least 2) to your first HTML page.


Tables

Tables are used for many puroses in HTML, from displing tabular data to creating advanced layouts for an HTML page. Tables actually contain three tags and have attributes. The beginning of the table is marked with the table tag <table>. Then you define a table row, <tr> and rows are made up of table cells, <td>. Think of an Excel spreadsheet structure, this is what you are defining with HTML.

For Example...

<table border="1">
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</table>

Creates this...

Row 1 Cell 1 Row 1 Cell 2
Row 2 Cell 1 Row 2 Cell 2

In the above example <table border="1"> border is an attribute, it defines additional options for the tag. Other attributes exsist for not only the table tag but the table rows and cells themselves.

For Example...

<table border="2" cellpadding="10" cellspacing="0" bordercolor="#990099">
<tr>
<td bgcolor="#FFFFCC">Row 1 Cell 1</td>
<td bgcolor="#66FFFF">Row 1 Cell 2</td>
</tr>
<tr bgcolor="#66FFCC">
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
</tr>
</table>

Creates this...

Row 1 Cell 1 Row 1 Cell 2
Row 2 Cell 1 Row 2 Cell 2

Conclusion and Activity!

HTML is easy and fun! Don't be intimadated just try new things and relax. For more information try some online HTML tutorials. There are many out there that are very useful. Here are a few to get you started.

  1. http://www.w3schools.com/html/
  2. http://www.davesite.com/webstation/html/
  3. http://www.htmlcodetutorial.com/
  4. http://www.htmlprimer.com/

Are you asking yourself how I made those links above? Go here to learn more!

Try it yourself...

  1. Link your favorite site list
  2. Experiment with a table

Created by Veronica Noone
Updated 06.02.2005
vnoone@ccbcmd.edu