Sunday, September 19, 2021

New Tags in HTML 4.0

The W3C document "Changes between HTML 3.2 and HTML 4.0" lists eight
new tags in HTML 4.0. A brief description of these tags follows.


The <Q>…</Q>
tag acts much the same as the <BLOCKQUOTE> tag, but applies to shorter
quoted sections, ones that don’t need paragraph breaks. Example:

According to the W3C, <Q>BLOCKQUOTE
is for long quotations and Q is intended for short quotations
that don’t require paragraph breaks.</Q>

HTML 4.0 requires both the start tag and the end tag for <Q>.


tag indicates an acronym in the text. <ACRONYM> is a "phrasal"
tag, meaning that it helps define the structure of a text phrase. Make sure to use
<ACRONYM> for the acronym itself, not the title that the letters stand
for. <ACRONYM> behaves like <EM>, <STRONG>,
and <CODE>. Example:

Working with the World Wide Web requires a good head for acronyms. <ACRONYM>HTML</ACRONYM>, <ACRONYM>WWW</ACRONYM>, and <ACRONYM>HTTP</ACRONYM> are but a few of the acronyms found
around the Web.

HTML 4.0 requires both the start tag and the end tag for <ACRONYM>.

<INS>…</INS> and <DEL>…</DEL>  


<INS>…</INS> to mark parts of a document that have been added
since the document’s last version. <DEL>…</DEL>, similarly,
marks document text that has been deleted since a previous version. Example:

Welcome to our online personnel policy guide. <INS>In the spirit of relaxed living, our dress code now requires only that you meet TV’s decency standard.</INS> <DEL>In the spirit of conservative
virtues, we require every employee to wear a suit to work every day.</DEL>

HTML 4.0 requires both the start tag and the end tag for both <INS>
and <DEL>.



allows you finer control over the formatting of tables by specifying groups of columns
that share width and alignment properties. Every table must have at least one <COLGROUP>;
without any specific <COLGROUP> definition, HTML 4.0 assumes the table
consists of a single column group that contains all the columns of the table. If
you wanted, for example, to create a table that had a single, wide description column
followed by a series of small check boxes, you would code:

<COLGROUP span="10" width="30">
<COLGROUP span="1" width="0*">


This way, the first <COLGROUP> tag formats all ten check boxes,
much nicer than typing in ten identical specifications–for each row!

The start tag for <COLGROUP> is required; the end tag is optional.


tag, you can group related form fields, making your form easier to read and use.
Human brains like to be able to classify information, and <FIELDSET>
helps do just that. When you enclose a group of form elements in the <FIELDSET>

tags, the browser will group the elements so you can easily tell they belong together.
Figure A.1 shows how Internet Explorer 4.0 displays Listing A.1.

HTML 4.0 requires both the start tag and the end tag for <FIELDSET>.

FIG. A.1
<FIELDSET> groupings in Internet Explorer 4.0.

Listing A.1

Grouping form information using


If you looked at the code
for the <FIELDSET> example above, you saw the <LABEL>…</LABEL>

tags in action. Use <LABEL> with <FIELDSET> to attach
a label to the form grouping. Figure A.2 is the same as the <FIELDSET>
example, except that the first <LABEL> has been removed. HTML 4.0
requires both the start tag and the end tag for <LEGEND>.

FIG. A.2
The <FIELDSET> example with the first <LABEL> removed.


tag, another addition to forms, allows you to have push buttons on forms that more
closely resemble push buttons available in Windows and other applications. Many aspects
of <BUTTON> are similar to those of <INPUT> elements
of types submit and reset, but <BUTTON>, in the words of the W3C,
"allows richer presentational possibilities." One example of a "richer
presentational possibility" is the fact that a <BUTTON> has beveled,
shadowed edges, looking 3-D rather than flat, and "moves" when clicked,
giving the impression of being pushed in, then released. Listing A.2 and Figure A.3
show buttons at work.

FIG. A.3
The <BUTTON> tag at work.

Listing A.2

Adding a Button to a Form

HTML 4.0 requires both the start tag and the end tag for <BUTTON>.

from Special Edition Using HTML 4: Appendix A

What’s New in HTML 4.0

© Copyright Macmillan Computer Publishing. All
rights reserved.

Previous articleGoodies to Go! Newsletter #320
Next articleAwards

Popular Articles