---
id: 637f4e1c72c65bc8e73dfe20
videoId: V8UAEoOvqFg
title: HTML Boilerplate Question A
challengeType: 15
dashedName: html-boilerplate-question-a
---

# --description--

To demonstrate an HTML boilerplate, you first need an HTML file to work with.

Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`.

You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files.

To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file.

It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems.

## The DOCTYPE

Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply `<!DOCTYPE html>`.

The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4:

```html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
```

However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use `<!DOCTYPE html>`.

Open the `index.html` file created earlier in your text editor and add `<!DOCTYPE html>` to the very first line.

# --question--
## --text--

What is the purpose of the `DOCTYPE` declaration?

## --answers--

It tells the browser which version of HTML to use to render the document.

---

It tells the browser that this document uses JavaScript.

---

It tells the browser the title of the document.


## --video-solution--

1
