Re: Q about the standard

<u>underlined <b>bold & underlined</u>just bold</b>

is illegal the tags don't nest. However current browsers will display it.

<u>underlined<b>bold &underlined</b></u><b>just bold</b>

is legal because the tags nest.

However the & should be expressed as an entity &amp;
i.e<u>underlined<b>bold &amp; underlined</b></u><b>just bold</b>
is now completly legal.

>The following elements may be used as either block-level elements or
>inline elements. If used as inline elements (e.g., within another inline
>element or a   P), these elements should not contain any block-level
elements.
If they are used by them selves or in a DIV they are considered block level
elements.
e.g. <SCRIPT></SCRIPT>
or
<DIV><SCRIPT></SCRIPT> </DIV>
<SCRIPT> would be considered a block element.
but
<SPAN><SCRIPT></SCRIPT></SPAN>,
or
<P><SCRIPT></SCRIPT></P>
would be considered to be an inline element.(The HTML DTD says that P cannot
contain a block level element, i.e.<P><DIV></DIV></P> is illegal.)
You may want to look at
http://www.w3.org/TR/REC-html40-971218/intro/sgmltut.html
which is a very good tutorial on SGML as it applies to HTML.
Hope this helps.

Incidently both B and U have been deprecated, although theyare of course
still legal.
Frank
-----Original Message-----
From: Henrik Lynggaard Hansen <heha97ad@student.econ.cbs.dk>
To: www-html@w3.org <www-html@w3.org>
Date: Saturday, June 20, 1998 1:44 PM
Subject: Q about the standard


>hi
>
>for a school project im going to write a (miniature) HTML validator, but
>i have a couple of questions regarding the html standard
>
>* is this legal: <u>underlined <b>bold & underlined</u>just bold</b>  or
>should it be written as :
>
>                   <u>underlined<b>bold &underlined</b></u><b>just
>bold</b>    ????
>
>
>* in the 4.0 specs under block element it is writtten:
>
>The following elements may be used as either block-level elements or
>inline elements. If used as inline elements (e.g., within another inline
>element or a
>        P), these elements should not contain any block-level elements.
>
>            APPLET - Java applet
>            BUTTON - Button
>            DEL - Deleted text
>            IFRAME - Inline frame
>            INS - Inserted text
>            MAP - Image map
>            OBJECT - Object
>            SCRIPT - Client-side script
>
>
>but how do i determine wether it is used as blocklevel or inline
>elements ???
>
>
>* The DOCTYPE element contains a link to a DTD. what is a DTD and how is
>it used ??
>
>
>cheers from denmark
>Henrik Lynggaard
>
>
>

Received on Saturday, 20 June 1998 16:58:39 UTC