Which HTML tag is NOT valid in strict DHTML structure ?
2026
Which HTML tag is NOT valid in strict DHTML structure ?
Answer: B. <font> — An HTML document's Document Type Definition (DTD) fixes which tags are legal. HTML 4.01 (and XHTML 1.0 built on the same content models) defines three DTD…
- A.
<script>
- B.
<font>
- C.
<span>
- D.
<div>
Attempted by 76 students.
Show answer & explanation
Correct answer: B
An HTML document's Document Type Definition (DTD) fixes which tags are legal. HTML 4.01 (and XHTML 1.0 built on the same content models) defines three DTD levels — Strict, Transitional, and Frameset. Among the constructs the Strict DTD excludes are the specific elements HTML 4 marked as deprecated because they existed purely to hard-code presentation in the markup instead of leaving it to CSS.
Applying this to the four tags in the options: <script> defines executable behaviour, and <div>/<span> are generic structural containers with no fixed presentation of their own — none of the three was ever marked deprecated, so all three remain part of the Strict DTD's element set at every DTD level. <font>, in contrast, is exactly one of the elements HTML 4 deprecated for hard-coding presentation (typeface, size, colour) in the markup; as a deprecated presentational element it is excluded from the Strict DTD, so it survives only in the Transitional/Frameset DTDs.
<script> — a behavioural tag for embedding/linking executable code; it was never marked deprecated, so it is retained in the Strict DTD.
<span> — a generic inline container with no fixed presentation of its own; it was never marked deprecated, so it is retained in the Strict DTD.
<div> — a generic block-level container with no fixed presentation of its own; it was never marked deprecated, so it is retained in the Strict DTD.
<font> — one of the elements HTML 4 formally deprecated for hard-coding a text's typeface, size, and colour directly in the markup; as a deprecated presentational element it is excluded from the Strict DTD, so it survives only in the Transitional/Frameset DTDs.
Cross-checking against the W3C HTML 4.01 Strict DTD (and the XHTML 1.0 Strict element list) confirms this directly: SCRIPT, SPAN, and DIV are declared elements, while FONT — a deprecated presentational element — is absent. So the tag that is NOT valid in a strict DTD-based (D)HTML structure is <font>.