Thursday, December 20, 2007

HTML EXAMPLES ... TEST YOUR KNOWLEDGE



Testing your knowledge



Testing your knowledge



Who can tell me what is wrong with the following HTML files?




Example #1


<HTML>


<HEAD>

<TITLE> HTML Error #1 </TITLE>

</HEAD>


<BODY>

<DL>

<DT>This is my list,


<DD>It's a very nice list,

<DL>

<DT>It would never harm a soul.

<DD>But I wonder why,

<DL>

<DT>My formatting doesn't come out

<DD>Quite right.


<DL>

<DT>Strange,

<DD>indeed...

<DL>


</BODY>

</HTML>





Example #2


<HTML>


<HEAD>

<TITLE> HTML Error #2 </TITLE>

</HEAD>


<BODY>


<OL>

<DD>This is another list

<DD>This one is strange too..

</OL>

<OL>

<DD>I just know I'm doing it right this time,

<DD>What could possibly be wrong?


</OL>


</BODY>

</HTML>




Example #3


<HTML>


<HEAD>


<TITLE> HTML Error #3 <TITLE>

</HEAD>

<BODY>


<H1>Here is my header</H1>

<P>

Well, this one looks just fine. I wonder what could possibly be wrong.


<P>


</BODY>

</HTML>






Before you go onto the next example, shrink your web browser window so that the longer red bar here is too wide to be seen at one time, but the shorter red bar is entirely visible at once.







Then study the HTML to see if you can predict what will happen.


Next go to this example. Once
you see the example, widen your browser and look at it again using the full screen width. What happens? Why?


Example #4


<HTML>


<HEAD>

<TITLE>

</TITLE>

</HEAD>


<BODY>

<IMG SRC="../gifs/bar.gif" ALT="--------">

<IMG SRC="../gifs/clinton.gif" ALT="Clinton Waving">

<IMG SRC="../gifs/bar.gif" ALT="--------">

</BODY>

</HTML>


No comments: