XHTML and HTML 5




CS174

Chris Pollett

Aug 31, 2016

Outline

HTML/XHTML

On Monday, we introduced HTTP, the protocol above TCP/IP for retrieving hypertext documents. I.e., web pages. We now describe the language used to make web pages: HTML.

HTML Variants

Basic Syntax

Standard XHTML 1.1 Document Structure

XML declarations:

<?xml version ="1.0" encoding="utf-8" ?>
<!-- as not supported by some old 
   browsers validators doesn't usually check this -->

SGML DOCTYPE. This says which Document Type Definition will be used:

<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

The XHTML document:

<html xmlns="http://www.w3.org/1999/xhtml" >
		<!-- might have namespaces for other things like SVG -->
<head>
	<title>name of my document</title></head>
<body><!--actually page stuff--></body>
</html>

Minimal HTML 5 Document

Where to Edit HTML

How to "run" your HTML

What does it mean for your HTML to "work"?

Let's build something...