Loading...

The browser has a few questions for you before you begin building your website.

Imagine that you buy a bicycle that needs to be put together, but you don't feel like looking through the assembly instructions. Or maybe you want to replace your computer's graphics card, but don't want to browse online for tutorials. You know you should read the manual for the awesome new game you bought, but you're just too excited and want to jump right in!

Next thing you know, your handlebars fall off, you erase your hard drive, and you get killed by the weakest enemy in the game.

Granted, these are worst-case scenarios, but a lot of things can go wrong when you're just guessing. What about your browser when you design a webpage? If you don't give your browser the information it needs, it can only guess at how to handle your document. Everything may work out fine, but things will go much smoother if you give your browser the whole instruction manual.

This is why HTML documents have a basic template structure. Each section provides a different piece of information to the browser. This helps you get the most out of your website.