To Lecture Notes

IT 130 -- 1/25/10

 

Review Questions

  1. Write an XHTML file that contains a title, an h1 heading, and a paragraph.

    Ans: See answer to Question 2.
     
  2. Write a CSS document-level inline styles that do the following:

    1. Sets the following for the body: font to Georgia, text color to navy, background color to AliceBlue, font size to 120 percent of normal.

    2. Sets the following for an h1 heading: font to Papyrus, text color to maroon, font size to 150% larger than the body, underlined.

    3. Sets the following for a paragraph: background color to black, text color to HotPink, font size 110 percent larger than the body.


  3. Ans:
    <html>
    
    <head>
    <title>This is the title</title>
    </head>
    
    <body style=font-family: Georgia;
                    color: Navy;
                    background-color: AliceBlue;
                    font-size: 120%;>
    
    <h1 style=font-family:Papyrus;
                  color: Maroon; 
                  font-size:150%;>The h1 Header</h1>
    
    <p style=background-color: Black;
                 color: HotPink;
                 font-size: 110%;>This is the paragraph</p>
    
    </body>
    </html>
    
  4. Rewrite the styles in Problem 1 as document-level styles that set the styles for the body, all h1 headings, and all paragraphs.
     
  5. Ans:
    <html>
    
    <head>
    <title>This is the title</title>
    <style type=text/css>
    body { font-family: Georgia;
           color: Navy;
           background-color: AliceBlue;
           font-size: 120%; }
    h1   { font-family:Papyrus;
           color: Maroon; 
           font-size:150%; }
    p    { background-color: Black;
           color: HotPink;
           font-size: 110%; }
    </style type=text/css>
    </head>
    
    <body>
    
    <h1>The h1 Header</h1>
    
    <p>This is the paragraph</h1>
    
    </body>
    </html>
    
  6. Here is a link to Sample Website 2 and its navigation architecture.
     
    Write the relative path from the source file to the target file:

    Current File Target File or Image
    a.htm d.htm
    letters-home.htm b.htm
    d.htm e.gif
    last.htm last.gif

Answers:
<a href=../second/d.htm>To d.htm</a>

<a href=first/b.htm>To b.htm</a>

<img src=pics/e.gif />

<img src=last.gif />

 

The Website Plan

 

Review for Midterm