<html> Topic 3

Answers to the Quiz

You will not be "graded" on this review; it is for your own use.

 
1. The correct order is
  • <html>
  • <head>
  • <body>

 

2. </> indicates the end of an element. </html> is the end of the html command or </head> is the end of the head section. So now do you recognize what the title of the series means: "html </confusion>"?

3. Dave Raggett explains on page 41 of HTML 4 that a number of tags do not require an end or delimiter tag. The <html> <head> <body> do not require end tags, but usually are given one. The <p> tag for a paragraph is not supposed to require an end tag. The <b> for bold text does require an end tag. In general, however, for tags where the end is "optional" you will want to put it in. Some browsers will not display correctly without that end tag. However, be sure to note the list of tags on page 41 that must not have a tag.

4. The rule here is that a tag will not work if you have a space inserted between the opening bracket < and element name. Yet, you are allowed to have a space between a closing bracket if you put one there. That means < title > and < TITLE > will not work with those extra spaces, although the other variations will work. This extra unwanted space after the opening bracket is one of those small mistakes that will make your code unreadable.

5. All of these tags except the last one will work. You can omit or include the space around the equal sign. You can omit the quotation marks before and after the attribute name, so long as that name does not include any unusual characters. However, it is a good habit to use the quotation marks since you will occasionally use the strange characters, such as a % mark when you are setting width. Missing either the opening or close quotation mark and having only one of the pair is one of those small mistakes that will make your code unreadable.

6. The <title> and </title> tags are the only ones required to be inside the <head> and </head> tags.

7. On the quiz page, the file name is "03quiz.html" and the title is "Do you know?"

A good suggestion: Get in the habit of always doing your code the same way—all caps or all small letters, quotation marks around all attribute names, and no extra spaces. Being consistent makes it easier to avoid or find mistakes.

Readings
Resources
<head>
<p> etc.
<b> etc.
<li> etc.
<a href>
<img src>
Access
<table>
<frame>
<style>
<form>
<script>
<object>
validate

Copyright by dwang, 1999. All rights reserved.