HTML: Getting Started [1/14]

Each HTML document starts with a Document Type Declaration (DTD) or <!DOCTYPE>. <!DOCTYPE> is a directive which helps the browser to identify the version of HTML used in a web page so it can display it properly.

For example, for an older HTML version (4.01), <!DOCTYPE> looks somewhat messy:


However for the latest HTML version it is more concise and readable:

<!DOCTYPE html>

The latest HTML version is called HTML 5. It has already been ubiquitously adopted as a standard, so let's call it plain and simple, HTML.

Do it
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
body { min-height: 500px; background-color: #2f358f; background-image: url("/assets/course2/logo.png"); background-repeat: no-repeat; background-size: 200px; background-position: 50% 50%; }
HTML Academy
  1. Change the <!DOCTYPE> directive to the latest format.
Theory Check Next