Setting up the HTML document

Let's open our favorite text editor and create an HTML document. Since we're working with census data, let's call it census.html. We'll start with an HTML5 template. Browsers will recognize it as HTML5 by the appropriate document type at the top of the page. Our HTML5 page starts out as follows:

<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>

Starting from the head

The head of an HTML document contains information about the page including the title, metadata about the page content, Cascading Style Sheet (CSS) links to tell the browser how to render the output, and any scripts that the developer needs the browser to run before it reads the rest of the page. Here is an example of a simple webpage:

<!DOCTYPE ...

Get Mastering ArcGIS Server Development with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.