XHTML and HTML 5




CS174

Chris Pollett

Aug 31, 2020

Outline

HTTP Basics

Last Wednesday, we introduced HTTP, the protocol above TCP/IP for retrieving hypertext documents. I.e., web pages. We start today by going over in a little more detail how it works, and then switch to talking about HTML, the language that web pages are written in.

More HTTP

Header Fields

Response Phase

HTML/XHTML

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. 192.57.126.255 is a fully qualified domain name.
  2. A MIME type was originally used to declare the type of an attached document to an email.
  3. HTTP/1.1 is discontinued and no one uses it any more now that HTTP/2 is available and HTTP/3 is coming online.

Where to Edit HTML

How to "run" your HTML

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