Before taking this course you should have:
This workshop will teach you how to create and understand the basics of HTML. With guided practice lessons, simple to follow instructions, and handouts, you will be able to create simple yet effective HTML pages.
HTML is short for Hyper Text Markup Language and is the authoring language used to display content in Web Browsers. This includes the structure of a page, how fonts are formatted, and how images are displayed. This is accomplished by using tags.
For Example:<p align="right"></p> and <h1></h1>.
Both these files types are just HTML (HyperText Markup Language) code. These extensions whether 3 or 4 characters long are identical, just make sure you are consistent in whether you use .htm or html. The .HTM extension was used for operating systems like Windows 3.x that did not support long file names.
HTTP is short for Hyper Text Transfer Protocol. It is the underlying protocol used by the World Wide Web. HTTP defines how information is formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. For example, when you enter a URL in your browser, this sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page. For Example: http://www.utoronto.ca.
An HTML editor is a program that is designed with additional functions which make coding HTML by hand easier. Some familiar HTML editors include Dreamweaver, Frontpage and GoLive! Although you will probably be using these editors to do the major part of your HTML page, it is still good to understand the coding that goes on "behind" these pages.
When using various text editors, you may find that some include highlighting different parts of HTML code in different colour (tag names in one colour, attribute names in another, elements in a third), automatically spotting errors in coding like an unclosed tag, and other functions that assist you when you code HTML by hand. HTML editors can make programming easier, but not necessarily faster.
Notepad is a general-purpose text editor which is located in your Start » Accessories » Notepad.
Arachnophilia is a free HTML editor, specifically designed to assist in the creation of webpages. It can be downloaded at http://www.arachnoid.com/arachnophilia/
Another general purpose text editor in MAC version - For more information visit the Apple.com website
More information re: HTML/Text editors in Lesson 11 in ABC3
Tag elements define the structure of an HTML document and wrap around the
(plain text) content.
All tags must be enclosed in (less than) "<" and ">" (greater
than) symbols.
An attribute is attached to a tag, and usually has a corresponding value (element) enclosed in quotation marks and separated from the attribute name with an "equals" sign.
Example:
| Opening Tag | Element | Attribute | Text to be Formatted | Closing Tag |
| <h1 | align= | "center"> | Headline News | </h1> |
The most basic HTML tags are those necessary to the proper structure and identification of an HTML document, as listed below.
|
Basic HTML Document Structure<html><head> <title>{document title}</title> {additional non-visible information} </head> <body> {visible content of the document} </body> </html> |
If you would would like some additional information regarding meta tag info. please refer to this page - Meta Tag Builder Version 2 - http://vancouver-webpages.com/META/mk-metas.html
HTML web pages consist of simple elements called tags. When building a web page from the beginning, it is important to identify the document as an HTML document with the <HTML> and </HTML> tags.
A number of basic tags are used to structure an HTML document and provide simply styles to its text.
Tag |
Rendered Appearance |
<p>This text is in its own paragraph.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur a lectus id augue ullamcorper vehicula. Sed dictum erat eget quam. Aenean pharetra egestas urna. Duis lobortis pulvinar elit. Praesent eros arcu, fringilla at, pharetra in, tempus eget, sem. Nullam lacinia urna. Sed vitae purus. Aliquam lacinia posuere velit. Praesent quam. Nullam quis turpis. Suspendisse dolor. Cras ligula mauris, euismod eu, pharetra a, rutrum id, purus. In mattis ipsum non nisl. Nulla auctor tristique quam. Suspendisse molestie diam quis purus. Aenean laoreet tortor sit amet tortor. Etiam vitae massa. Suspendisse lacinia blandit leo. Nulla nec mi non neque aliquam sollicitudin. Quisque. </p> |
This text is in its own paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur a lectus id augue ullamcorper vehicula. Sed dictum erat eget quam. Aenean pharetra egestas urna. Duis lobortis pulvinar elit. Praesent eros arcu, fringilla at, pharetra in, tempus eget, sem. Nullam lacinia urna. Sed vitae purus. Aliquam lacinia posuere velit. Praesent quam. Nullam quis turpis. Suspendisse dolor. Cras ligula mauris, euismod eu, pharetra a, rutrum id, purus. In mattis ipsum non nisl. Nulla auctor tristique quam. Suspendisse molestie diam quis purus. Aenean laoreet tortor sit amet tortor. Etiam vitae massa. Suspendisse lacinia blandit leo. Nulla nec mi non neque aliquam sollicitudin. Quisque. |
This text is <strong>strong</strong> |
This text is strong |
| <em> This text is italic </em> | This text is emphasis |
This text is <tt>teletype.</tt> (monospace) |
This text is teletype. (monospace) |
This text is <del>deleted</del> |
This text is |
Insert a <hr> horizonal rule |
Insert a
horizontal rule |
Insert a <br> line break |
Insert a line break |
Tag |
Description |
| <h1>Heading 1</h1> | The heading tags should be used to identify th hierarchical structure of your text/content. H1 is the largest and most important heading while H6 is the smallest. H7 does not exist. It should be emphasized that these tags are structural in nature--their appearance in graphical browsers is intended to indicate document structure. They should not be used solely for visual effect. |
| <h2>Heading 2</h2> | |
| <h3>Heading 3</h3> | |
| <h4>Heading 4</h4> | |
| <h5>Heading 5</h5> | |
| <h6>Heading 6</h6> |
Tag |
Description |
| <ul> </ul> |
This tag will create an "unordered list" (or bulleted list) |
| <ol> </ol> |
This tag will create a "ordered list (or numbered list) |
| <li>Item #1</li> | This indicates the content of one entry in a list. One or more of these tags, with content, are nested within <ul> or <ol> tags. |
| <ul type="square"> | You can specify if your unordered list type is displayed as a circle, square, or disk |
| <ol
start="5"> <ol type="i"> |
You can specify the start of an ordered list to start at any number, even have your list displayed in alphabet or roman - large or small number type="a" type="A" type="i" type="I" |
Appearance |
HTML Code |
|---|---|
|
<ul> |
Appearance |
HTML Code |
|---|---|
|
<ol> <li>First numbered list item.</li> <ul> <li>First nested list item</li> <li>Second nested list item</li> </ul> <li>Second numbered list item</li> <li>Third numbered list item</li> </ol> |
To add style and form to your web page you may:
The STYLE attributes allows you to embed a number of style directives within a tag that will affect all content within that tag. The syntax of using it is slightly more complicated than the standard tag-attribute-value combination.
Appearance |
Example |
|---|---|
A paragraph with blue text. |
<p style="color:blue">A paragraph with blue text.</p> |
A paragraph with white text and a black background. |
<p style="color:white;
background-color:black"> A paragraph with <strong>white</strong> text and a <em>black background</Em>.</p> |
Selector |
Declaration Block |
h1 { |
Declaration |
Declaration |
} |
||
Property |
Value |
Property |
Value |
||
color : |
blue ; |
background-color : |
aqua ; |
||
Refer to Appendix A (216 Web Safe Colors)
Another useful tool to use to incorporate color into your web site - http://www.colorschemer.com/online/. If this links is not working, use this http://www.padge.com/colorscheme.htm
Web page colour can be changed by putting style directives within the STYLE attribute of tags.
width="150" height="253" alt="UofT Logo" |
width="200" height="202" alt="UofT Logo" |
width="200" height="133" alt="photo of UC" |
width="120" height="180" alt="photo of Soldiers' Tower" |
|---|---|---|---|
| *Photos courtesy of http://www.greatspaces.utoronto.ca/ website. | |||

<img src="pm.jpg" alt="photo of Jean Cretien" width="162" height="164" >
Before beginning to add images, it is a good idea to figure out how many images will be displayed and where. You will also need to resize your images prior to putting them into your webpage.
One method of laying out images on a page is to insert them into the cells of a borderless table. This can also be used to lay out images in relation to page text and so on.
![]() |
This is a photograph of two siamese cats, this text and the image to the left are displayed in a table with one row and two columns and with a table border of "0". With the hspace (horizontal space) of "0" - 10 pixels are placed on either side of the image giving it space, especially in this example where text is next to the image. |
| Attribute | Function | Example |
|---|---|---|
| WIDTH and HEIGHT | Explicitly set image width and height in pixels. | <img src="images/cats.jpg" alt="Photo of Cats" height="275" width="281"> |
| BORDER | Set a border round the image, in pixels. | <img src="images/cats.jpg" alt="Photo of Cats" border="1"> |
| ALIGN | Set image alignment in relation to subsequent text. Possible
values:
|
<img src="images/cats.jpg" alt="Photo of Cats" align="left"> |
| hspace | adds pixel space (blank) to the right and left of an image/photo. |
<img src="images/cats.jpg" alt="Photo of Cats" align="left" hspace="5" > |
| vspace | adds pixel space (blank) above and below the image/photo |
<img src="images/cats.jpg" alt="Photo of Cats" align="left" vspace="2"> |
<a |
href |
= |
"hobbies.html"> |
Link to My Hobbies |
</a> |
anchor |
hypertext reference |
"filename.htm" |
Link text |
Close anchor Tag |
"hobbies.html" is a file in the same directory on the web server as the web page that contains the original link. In other words, the location of the target file is described relative to the anchor or linking file.
The complete address to the target file is specified in an absolute link. Use absolute links when linking to other websites, not files within your own website.
The simplest link is one to a file within the same directory as the page you are linking from.
<a href="knock.html">Knock Knock!</a>Example - Knock Knock! (link will open in the same window)
You can have this document (link) open in a new browser window by adding the following information in the tag:
<a href="knock.html" target="_blank">Knock Knock</a>Another Example - Knock
Knock (link will open in a new browser window - target="_blank")
The following links exist outside of this tutorial (links will open in a new browser window - target= "_blank")
Graphic images can also be used as a link to a web page or web site. Instead of putting text as a placeholder for a link, an image can be used.
The following tags will allow a graphic to be a link:
<a href="http://rcat.utoronto.ca" target="_blank">
<img src="rcatlogo.jpg" height="92" width="93" alt="RCAT
logo>
</a>
Tag |
Description |
| <a href="mailto:email@utoronto.ca">email@utoronto.ca</A> | This anchor tag allows you to create a link that, when clicked on, opens up a new e-mail to the address specified in the browser's e-mail client (if supported). |
<P>Email Someone<a href="mailto:someone@utoronto.ca">someone@utoronto.ca</a></P>
There are many different types of links that you may add to your web page. In this lesson we learned about the following four types of links:
Table Tags |
Parameters |
<table> ... </table> |
This tag define a table - all other table tags such as <tr>, <th> and <td> must be nest within these tags. |
<tr> ... </tr> |
This tag defines a row within the table. |
<td> ... </td> |
This tag defines a table data cell and only appears within a <tr> tag. Many data cells can exist within a row tag and blank cells are accepted. |
<th> ... </th> |
This tag defines a table heading, and should be used like <td> tags within a row to label a table's columns, if desired. |
<caption> ... </caption> |
These parameters define a caption, and must appear within the <table> tag's boundaries. |
Appearance |
HTML Code |
||||||
|---|---|---|---|---|---|---|---|
|
<table border="1"> <caption>Table Caption</caption> <tr> <th>Left Heading</th> <th>Right Heading</th> </tr> <tr> <td>Left Top</td> <td>Right Top</td> </tr> <tr> <td>Left Bottom</td> <td>Right Bottom</td> </tr> </table> |
Tag |
Attribute |
Parameters |
|---|---|---|
<table> |
BORDER | If the border is not defined in the table tag, its default value is 0. The value of the border is a number indicating the width in pixels of the table's border. Example: <table border="2">. . .</table> |
<table> |
CELLSPACING | The cellspacing attributes defines, in pixels, the amount of space between individual data cells in a table. Example: <table cellspacing="3"> . . . </table> |
| <table> | CELLPADDING | The cellpadding attributes defines, in pixels, the amount of space between the content of data cells and the edges of the cells. Example: <table cellpadding="2">. . .</table> |
| <table> <tr> <td> or <th> |
WIDTH | The width attribute can appear in table, row, data cell, and header tags. Its value can be expressed as a percentage or number of pixels. If the width value is not specified, the table's width and the width of its cells will be determined by the amount of space required to fit the cell content. Examples:
|
| <td> or <th> | COLSPAN | The colspan attribute can cause a cell to span across multiple columns in a table. The value is a number indicating how many columns it should span. Example: <td colspan="2"> . . . </td> -- spans two columns |
| <td> or <th> | ROWSPAN | The rowspan attribute can cause a cell to span down multiple rows in a table. The value is the number of rows to span. Example: <td rowspan="3"> . . . </td> -- spans three rows |
In this lesson we learned about the following:
In this lesson you will learn:
Now that you have learned the basics with the help of our HTML Code Converter, we will look into creating actual HTML pages with a text editor called Notepad (the default text editor available on Windows systems).
Notepad can be found within the Start Menu » Programs » Accessories » Notepad. In opening Notepad, you will notice that it is a very simple text editor with no formatting or style sheets to guide you. This is adequate for creating HTML pages, as the code needs only to be plain text, because all HTML consists of plain text marked up with special tags. (i.e. <b>bold text </b>)
Once you have opened Notepad, you can type HTML code exactly as you have been doing before using the HTML Code Converter. This time, however, you will be saving your files to the hard drive so they can be opened in a web browser. Creating multiple HTML files in this manner and linking them together are the basic steps to completing your website.
HTML code is just plain text with special tags. This file needs to have the extension .html or .htm in order for the page to be rendered properly on a web browser. Remember to make sure that your are putting your "index.html" page in the root folder of your web site.
In this lesson you will learn:
Usually, a site's main introduction page is called "index.html". Placing an index main page into your directory on a webserver will automatically allow any websurfer to find this page when typing in your directory address, with no "/index.html" needed.
e.g. one could type into a web browser individual.utoronto.ca/sammyjones/index.html or simply individual.utoronto.ca/sammyjones and get the same result.
Eventually, your initial webpage will link to a number of other pages, and it is how these pages relate to each other that takes careful consideration.
Example 1 |
|
The example shown is a good idea of how your website directory should be structured. All html files are located in the main folder (one that you will name), which houses an images folder where all of your images will reside in. your folder/images/uoftlogo.gif |
|||
|
DESKTOP FOLDER [ Your Name ] |
||||
|
|
index.html |
|||
|
|
resources.html |
|||
|
|
photographs.html |
|||
|
|
images |
|||
|
|
|
uoftlogo.gif |
||
|
|
|
photo.jpg |
||
| Prototyping | Design Tips - the Basics |
Similar to the examples above, you can strongly benefit from "prototyping" your website first by:
|
Consider the following:
For additional information please review the Academic Technology Resources - Instructional Design / Design Guidelines section of our RCAT website. |
The index.html file is essential to your web site because it is the starting point that directs users to the other pages of a web site. Understanding this also conveys the importance of planning your web site with a logical order in mind, as opposed to letting your web site grow organically.
WS_FTP is an FTP client program which uses a graphical interface. It allows you to communicate with a remote FTP server to upload files and perform other functions. It is both easy to use and functional.
Ipswitch, the makers of WS_FTP, previously provided a version of WS_FTP called WS_FTP LE, which could be used free of charge by students, faculty and staff of educational institutions, or by home users using it for non-commercial purposes.
It has been replaced by WS_FTP Home which is now only a 30 day trial
Go to www.ipswitch.com to register.
WS_FTP is also installed on the computers for this class.
The University of Toronto's UTORweb service allows faculty, staff and students to request individual space for web pages and other files on a University of Toronto web server. More details can be found at http://www.utoronto.ca/ns/utorweb/faq.html
You can also access the notes from a previous lunchtime workshop RCAT conducted on FTP at http://www.utoronto.ca/cat/whatson/presentation_notes/ftp/index.html - these notes have details of WS_FTP and UTORweb, along with some other information on FTP.
A brief introduction to uploading files to a web server to make your web pages accessible to the public shows that the process is fairly simple. Some things to watch for when using FTP are:
Personal web space on University of Toronto servers is available through the http://www.utoronto.ca/ns/utorweb/faq.html
Doing web design by hand coding HTML can be effective, but it can also be slow, especially for pages with complex tables or layouts. Since the introduction of HTML, numerous different tools have been developed that help web designers out, either by making coding easier, or by automating coding functions so that the focus can be more upon the design aspect.
An HTML editor is a program that in many ways resembles a normal text editor, and can even be used as one. However, it is designed with additional functions which make coding HTML by hand easier. These may include highlighting different parts of HTML code in different colour (tag names in one colour, attribute names in another, variables in a third), automatically spotting errors in coding like an unclosed tag, and other functions that assist you when you code HTML by hand.
HTML editors can make programming easier, but not necessarily faster. Below are links to two such programs with which we have experience (there are others out there).
Arachnophilia is a free HTML editor, specifically designed to assist in the creation of webpages. It can be downloaded at http://www.arachnoid.com/arachnophilia/
EditPlus is an Internet-ready 32-bit text editor, HTML editor and programmers editor for Windows. Additional information and a download version can be found at http://www.editplus.com/
WYSIWYG stands for "What You See Is What You Get". WYSIWYG editors have an interface similar to that of a word processing or desktop publishing program, in which you enter the content by typing in the text and decide on the formatting by the use of buttons and menus. You are also able to insert tables and images into the document by use of buttons and menus.
Meanwhile, in the background, the program writes all of the HTML code for you. This greatly speeds up the production of web content, allowing you to focus almost completely on the design aspects rather than the coding aspects. Below are two WYSIWYG programs that are either freely-available or offered for the use of staff, faculty and graduate students by RCAT.
Netscape Composer is part of the free software package offered by Netscape. You are probably familiar with Netscape Navigator, their popular web browser. Composer has a limited number of functions compared to a program like Dreamweaver (see below), but it can be used for free simply by downloading the Netscape package from http://www.netscape.com/
Dreamweaver is a very powerful WYSIWYG program from Macromedia. A 30-day demo can be downloaded at http://www.macromedia.com/software/dreamweaver/download/.
RCAT also offers classes on using Dreamweaver, and bookable computers with full versions of the Dreamweaver software are available.
Whether you use the workshops HTML Code Converter, Notepad or any other HTML Editor or a WYSIWYG editor, practice is what is important. As oddly as it sounds, making mistakes, loosing your files, deleting or overwriting them are very common mistakes - usually ones that you do once and learn from.
Here are some of the resources available to graduate students and faculty through the Centre for Academic Technology: