<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" !>
Strict
DTD prevents deprecated elements (tags and
attributes).Transitional
DTD is most commonly used; it allows
deprecated HTML elements.Frameset
DTD is the same as traditional but the document
uses <frameset>
instead of <body>
.<!ELEMENT html (head, body)>
defines the <html>
tag in the HTML DTD.Create your own book DTD.
<!ELEMENT book (author, title, publisher, year)>
<!ELEMENT author (lastname, firstname, middlename?)>
<!ELEMENT lastname (#PCDATA)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT middlename (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT year length CDATA "4">
Use your book DTD to mark up book documents.
<?xml version="1.0" encoding="UTF-8"?>
<book>
<author><lastname>Hofstetter</lastname><firstname>Fred</firstname></author>
<title>Internet Literacy</title>
<publisher>McGraw Hill</publisher>
<year>1998</year>
</book>
<p>a paragraph with a word <em>emphasized </em>.</p>
<p>a paragraph with a word <em>emphasized.</p></em>
<li>
<LI>
(which is a different tag)<input type="text">
<input type="TEXT">
<p>paragraph 1</p><p>paragraph2</p>
<p>paragraph 1<p>paragraph2
/>
.
<br/>
or <br />
or <br></br>
<br>
alonebr, frame, hr, img, input, link,
meta, param
.<frame noresize="noresize">
<frame noresize>
checked, selected, disabled, multiple, nowrap,
noresize,
noshade
.<td rowspan="3">
<td rowspan=3>
<img src="sl.gif" alt="<Jack&Jill>">
<img src="sl.gif" alt="<Jack&Jill>">
<script type="text/javascript">
<![CDATA[
... unescaped script content ...]]>
</script>