In this section you'll make a basic web page that you'll be able to browse over the Internet. Rather than using Dreamweaver or some other HTML editor we'll be coding the HTML from scratch. Along the way, you'll be learning some basic HTML tags.
This section will get you started on setting up a generic webpage.
public_html
. If not, create that directory
now.
<html> <head> <title>Your name goes here</title> </head> <body> <h1>My CS 140 Webpage</h1> This will be more interesting soon. </body> </html>This is the foundation for your future webpage.
P:\public_html
myslu.stlawu.edu/~username
but replace the
username part with your SLU username.
If everything worked as expected, go back and look at
the index.html
file in Notepad. Obviously it looks
different on the web browser than it does in plain text.
This is the nature of HTML, web pages are stored in plain text with directives (the tags) to the browser about how to structure the page. The directives are given through HTML markup tags, any pair of words that starts with <something> and ends with </something>. Depending on what is inside the angle brackets, the text (or other media) between the tags appears differently in the browser.
So far you've learned about a couple simple markup tags. Now you'll learn how to display and link to content.
public_html
folder.
img
.
To have your picture appear on your
web page insert the tag <img src="image.jpg" />
into the body of your webpage wherever you'd like the image to
appear. Note, be sure to replace image.jpg
with
whatever the actual image file name is in your public_html
folder.Ctrl-R
will refresh the page).
You should see your image on the web page somewhere. If not, try
to figure out what happened.
.wav
file.
sound.wav
, but have it appear on the screen
as "My Cool Sound". Here's the HTML we'd write:
<a href="sound.wav">My Cool Sound</a>
public_html
folder,
and link to it on the web page. (Or use
the sound file you created the last lab).
p
in the tag <p>some text</p>
means "paragraph".
Somewhere in this web page I also have a list inside of another list. How do we express "lists in lists" in HTML?