XHTML and HTML 5




CS174

Chris Pollett

Feb 6, 2017

Outline

HTML/XHTML

Last Wednesday, 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

Quiz

Which of the following statements is true?

  1. The application level network protocol used to download web pages from a web server is called SMTP.
  2. A MIME type might be sent in a Content-Type: response header from a web server to let a client know how to use a response item.
  3. The Accept: header is required in HTTP/1.1 in all HTTP requests.

Where to Edit HTML

How to "run" your HTML

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