HTML Tutorial 4

Prepared by: Anthony Larrain


Attributes

Example 1

<h2 align="center">Biography </h2>

Browser Display

Biography

Example 2

In this example we will use attributes to change the background color and center some text elements. The code that follows will produce this page attributes.html

<html> <head> <title>Hci201 Illustrates using attributes to center text and change the background color</title> </head> <body bgcolor="tomato"> <h1 align="center" > The Great Fachimari </h1> <p align="center"> A web site devoted to a great chef from Lazio Italy</p> </body> <html>

Example 2 Explained

Design Tips

The Anchor Tag

Example 1

The code to link to the website with URL www.w3schools.com is

<p>A nice HTML tutorial, <a href="http://www.w3schools.com/">W3schools</a></p>

Browser Display

A nice HTML tutorial, W3schools

Example 1 Explained

Example 2

In this example we will write a page that links to three other pages. The code that follows will produce this page. hyperlink.html

Notice the links form a list.

<html> <head> <title>Suzzie Students Favorite Links</title></head> <body> <h2>These are a Few of my Favorite Links</h2> <ul> <li><a href="http://www.editplus.com/">Edit plus</a> - A nice HTML editor </li> <li><a href="http://condor.depaul.edu/~alarrain/hci201/">Hci 201</a> - My website class</li> <li><a href="http://condor.depaul.edu/~alarrain/hci201/res.html">Web resources</a> - Some nice resources </li> </ul> </body> </html>

Example 2 Explained

Design Tips

@Anthony Larrain 2005 - 2006

Send Questions or Comments to hci201@yahoo.com