Deliverables:
To complete this assignment you must perfom three tasks --
1.) Write your name and email on the sign-in sheet being passed around.
2.) Show the lab instructor the source code and visible web pages named
"hello_world.html", "hello_me.html", and "commands.html".
3.) Either print out your html code in the lab and turn it in to your lab instructor, OR
email your html documents to your lab instructor before midnight tonight. Note: you
can only turn in a printed version during the lab.
Introduction: The goal of this assignment is to allow you to become familiar with writing simple HTML documents and HTML with JavaScript.
As discussed in class, HTML uses tags to instruct the browser on how to display things. The HTML tags you will use today are the basic ones required to structure the HTML document ( <html> <head> <title> and <body> ) plus a few simple formatting tags such as <br> (line break) and <hr> (horizontal rule). You will also practice using the standard font sizes defined for use within HTML ( <H1> , <H2> , ... , <H7> ). There are many many more tags available, and learning HTML is simply a matter of finding the right tag to do the right thing.
In addition you will write some very simple JavaScript scripts. The scripts you write today will consist of a series of output statements. Javascript uses the command document.write( "text" ); to send text to the browser. The browser then interprets the text as part of the HTML document and displays the result on the screen. You will then learn a few simple JavaScript commands. Using JavaScript allows for web pages to become dynamic and sophisticated. See the links page on the course web site for examples.
Procedures:
PART 1:
Write the following in the document:
<html>
<head>
<title> Put your name here </title>
<!-- This is a comment line - ignored by the browser -->
<!-- Name: Put your name here -->
<!-- Email: Put your email here -->
<!-- Lab 01 -->
</head>
<body>
<h1> Hello, World! </h1> <br>
<h3> Hello, World! </h3> <br>
<h7> Hello, World! </h7> <br>
<hr>
JavaScript uses a function called document.write to write things to the screen. <br>
<script language="JavaScript">
document.write(" <h1> Hello, World! </h1> <br> ");
document.write(" <h3> Hello, World! </h3> <br> ");
document.write(" <h7> Hello, World! </h7> <br> ");
</script>
</body>
</html>