Harvard Extension School
CSCI E-12 Fundamentals of Web Site Development | Spring 2019

## A Tale of Two Documents

### XML Syntax
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>My Document</title>
    </head>
    <body>
        <h1>My Document</h1>
        <ul>
            <li>coffee</li>
            <li>tea</li>
        </ul>
        <img src="images/lake.jpg" alt="Lake" />
    </body>
    </html>
| ### SGML/HTML Syntax
    <!DOCTYPE html>
    <HEAD>
        <TITLE>My Document</TITLE>
    <BODY>
        <H1>My Document</H1>
        <UL>
            <LI>coffee
            <LI>tea
        </UL>
        <IMG SRC=images/lake.jpg ALT="Lake" >
Markup - XML syntax Validate with Nu Html Checker | Markup - SGML/HTML syntax Validate with Nu Html Checker

### Fairness to the "SGML/HTML" Syntax

Of course, you can use the SGML/HTML syntax and write HTML that looks better. Just because the syntax allows you shorten things and leave out things, doesn't mean you have to.
Like this:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>My Document</title>
    </head>
    <body>
        <h1>My Document</h1>
        <ul>
            <li>coffee
            <li>tea
        </ul>
        <img src="images/lake.jpg" alt="Lake" >
    </body>
    </html>

Markup - SGML/HTML syntax
Validate with Nu Html Checker

Copyright © David Heitmeyer