- Write the HTML necessary to create the following list:
- First item
- Sub-item 1
- Sub-item 2
- Second item
- Sub-topic 1
- Sub-topic 2
- Odd
ball sub-topic 3
- Out of sequence item
- Write the HTML necessary to create the following table. Note that
the background color of the cell in row 2, column 1 is yellow, the
columns have equal widths, and some cells have the text on the left,
some centered, and some on the right.
Table Caption
| Cell one |
I am bigger |
| Wow |
now |
brown cow |
- Here is one way to make an image into a link:
<img
src="graphics/myhome.gif" alt="link to my home page" width="69"
height="75"
border="2px"
onclick="document.location.href='../mainfolder/index.htm'" />
- Assuming you're writing the HTML in the same file as the above
image link, use an anchor element (<a>...</a>)
to use the same image file as a link to the same web page.
- If the URL to the file containing the original image link is
http://www.netbios.com/flintstonefred/travel/vacation.htm,
- What is the full URL to the image file in the original image
link?
- What is the full URL to the linked
to file (the one you'd browse to, if you clicked on the image)?
- If you have file1.htm and file2.htm with respective URLs
http://www.myserver.com/myhome/folder1/file1.htm and
http://www.myserver.com/myhome/folder2/file2.htm
- Write the HTML necessary to create a bookmark named middle in file2.htm.
- Write the HTML that creates a relative link from file1.htm to
the bookmark you added to file2.htm.
- Write the HTML that creates an absolute link from file1.htm to
the bookmark you added to file2.htm.
- Write the HTML that creates an internal link from file2.htm to
the bookmark you added to file2.htm.
- Write the HTML needed to create a button, which when clicked
changes the background color of the web page to green.
- Which of the following are NOT legal JavaScript variable names?
answer 1, 1stValue, myAnswer,
first name, true, TRue, sillyName, areYouReady?, number5
- The following HTML modifies some text properties with CSS, give
another way to accomplish the same things with the <font> element
and its attributes.
<span style="font-size:5;
color:red; font-family:Courier">some text.</span>
- What word is used to describe an HTML tag or attribute that is
slotted for eventual removal, but should still work in most
browsers? Give 3 examples of such tags, elements, or attributes.
- Shown below is the old way (scheduled for removal) to make an
ordered list that uses lower-case letters (a,b,c,...) for labels. How do you
accomplish this with CSS?
<ol
type="a">
<li>item 1</li>
<li>item 2</li>
</ol>
- What elements are used in a definition list?
- Give an example of a JavaScript comment, and another example of a
HTML comment.
- What are the default settings for the font-weight and alignment
(left, right, or centered) for table header elements <th>?
- Name three event handlers of HTML buttons. When does each event
handler spring into action?
- Name three methods of the document object or window object, and
give examples of using each.
- Write a JavaScript script that asks the user for their name,
then, using their name, asks them for their favorite type of food, and
finally opens an alert box with a message similar to "Gee Tom, I like
corn on the cob too!".
- Suppose student1
and student2 are
variables representing person objects.
Each person object has a name sub-object,
with 2 String properties, first (for
the person's first name) and last
(for the person's last name). Each person object also has an age property (that stores their age
in years), and a gender
property (set equal to male or female). Write JavaScript to carry out
each of the following tasks.
- Set the values of student1's sub-objects and properties so that
student1 represents Tom Linton (I'm 42 years old).
- Set student2's gender to the gender of student1.
- Set student2's age to student1's age plus 5.