If you’ve ever needed a basic starter HTML 5 document, it’s your lucky day. I’ve got just that for you.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> </head> <body> <!-- page content --> </body> </html>
If you’re not sure what each of the parts of the document are, here’s a quick run down.
Doctype is a declaration to the browser to let it know it’s an HTML 5 document so that it renders it correctly.
The html tag is pretty obvious, in that everything in-between is part of the web page.
The body is what you’ll see presented on the web page. This may include navigation elements, paragraphs, images and so forth.
The next time you need to test out a script, check some styles, or begin a new project use this simple HTML document to get you started.