Iowa State University

Iowa State University

ISU Web Guide

Turn HTML into XHTML

XHTML is the successor to HTML. It's more strict than HTML, because all tags must be closed. HTML doesn't necessarily care if you close a <p> with a </p>. XHTML does.

You can find many tutorials on XHTML online, but here are some examples that should help you transform most HTML documents.

XHTML

HTML

<p> paragraphs </p> <p> paragraphs
< img src="http://dog.gif" alt="dog" /> < img src="http://dog.gif" alt="dog" >
<br /> <br>
<li> paragraphs </li> <li> paragraphs

Validate your page

Check your page for coding errors, using the W3C validator. If you check the "show source," you'll be able to find errors by numbered lines.

Google "XHTML tutorial" to find lots of online help learning XHTML.