TimKeesling.com
XHTML Week 2 Review Questions and Answers


1. What is the difference between a Well-Formed document and a Valid document?

  1. A Well-Formed document will obey the rules of XML which includes, properly written tags - quoted attributes, closed, lowercase. Included as well is proper nesting order.
  2. A Valid document is a document in which its elements and attributes match that of the DTD supplied whether it be (Strict, Transitional or Frameset).

2. Briefly describe the differences between the Strict, Transitional, and Frameset DTDs. You might approach this question by explaining when each would or could be used and adding a little bit of your own reasoning.

  1. Strict - XHTML Strict DTD is the most strict DTD available: no deprecated tags are supported and the code must be written correctly. I personally like this DTD because it is more of a challenge to write proper markup and I believe will make it easier for those that use this type in the future as we venture toward XML.
  2. Transitional - XHTML Transitional DTD is like the XHTML Strict DTD, but deprecated tags are allowed. This is the most popular current DTD. This DTD would be more desirable if you need to be backward compatible with older browsers that do not understand Cascading Style Sheets.
  3. Frameset - XHTML Frameset DTD is the only XHTML DTD that supports Frameset. This DTD is used if you need to partition the browser window to load multiple webpages in a single browser window. I have my own opinion on Framed websites and unfortunatly, it is not a very high opinion. When I first started in the middle 1990's I used Frames all the time. I have sense strayed from using frames due to the cross platform compatibility issues plus monitor display sizes.

3. Three font questions:

  1. What are two ways to adjust font size in XHTML documents?
    1. Using the <font> element with the size attribute which is deprecated in HTML 4.0 and XHTML 1.0
    2. Using CSS whether it be INLINE, EMBEDDED or EXTERNAL stylesheet.
  2. Which method is preferred?
    1. CSS is the preferred methed!
  3. Why is that method preferred?
    1. With CSS you have a whole range of font property options, including relative, absolute and percentage sizes.

4. How do you nest lists (ul or ol) in XHTML? --Provide an example please.

<!--Start of Nested List Example-->     
<ol>
   <li>1st Block - 1st Row
       <ul>
           <li>2nd Block - 1st Row
               <ul>
                  <li>3rd Block - 1st Row</li>
                  <li>3rd Block - 2nd Row</li>
                  <li>3rd Block - 3rd Row</li>
               </ul>
           </li>
           <li>2nd Block - 2nd Row
               <ul>
                  <li>3rd Block - 4th Row</li>
                  <li>3rd Block - 5th Row</li>
                  <li>3rd Block - 6th Row</li>
               </ul>
           </li>
           <li>2nd Block - 3rd Row</li>
       </ul>
   </li>
   <li>1st Block - 2nd Row
        <ul>
           <li>2nd Block - 4th Row</li>
           <li>2nd Block - 5th Row
               <ul>
                  <li>3rd Block - 7th Row</li>
                  <li>3rd Block - 8th Row</li>
                  <li>3rd Block - 9th Row</li>
               </ul>
           </li>
           <li>2nd Block - 6th Row</li>
       </ul>
   </li>
   <li>1st Block - 3rd Row
        <ul>
           <li>2nd Block - 7th Row</li>
           <li>2nd Block - 8th Row</li>
           <li>2nd Block - 9th Row
               <ul>
                  <li>3rd Block - 10th Row</li>
                  <li>3rd Block - 11th Row</li>
                  <li>3rd Block - 12th Row</li>
               </ul>
           </li>
       </ul>
   </li>
</ol>
<!--End of Nested List Example-->

5. Briefly describe something you learned this week about XHTML - from the reading, the assignment, etc. Anything really. It would be good if you could share an AHA! experience (or an Uh-oh, Oh No!, OHHHH, etc.) ... something new or eye-opening that you learned this week.

  1. I have actually really understood for the first time after looking through all of reference material, how important it is to apply the proper DTD to your XHTML document. In the past, lack of knowledge was BLISS! I am glad that I have finally seen the light on this matter. I have to say that my AHHHH.... moment would have to be the nesting of the lists. Like I have stated before, I have been making these lists for a long time but not really understanding what I was doing. I would constantly NOT close the <li> tag. I already knew that the <font> element was on its way out , so it was not that much of a surprise to me.

XHTML Week 2 Project Assignment

XHTML Week 2 Extra Credit

Valid XHTML 1.0 Strict