Simple HTML Template

Here’s a quick tip you might find useful when building your website.

All HTML files share a common structure. They all have <!DOCTYPE html>, <html>, <head> and <body>, and a number of other common tags. Instead of writing out the same basic structure for every page of your site, you can save time by using a template. Each time you create a new page, open up your HTML template file and save a separate copy. Easy!

What to Include In Your HTML Template

Here are some suggestions:

  • a <!DOCTYPE html> declaration
  • tags for <html>, <head>, <body> and <title>
  • a link to an external stylesheet
  • <style> tags for an internal stylesheet
  • <script> tags linking to an external JavaScript
  • <script> tags for an internal JavaScript
  • a link to the latest version of jQuery

Of course, you won’t use everything in a single page, so delete whatever you don’t need. In your template you may want to include other elements such as PHP scripts or meta tags. It really depends on how you want to use it.

Too Lazy to Make Your Own?

Click here to download a free HTML template. Tweak it as you like!

Recommended Training – Treehouse

TreehouseAlthough this site recommends various training services, our top recommendation is Treehouse.

Treehouse is an online training service that teaches web design, web development and app development with videos, quizzes and interactive coding exercises.

Treehouse's mission is to bring technology education to those who can't get it, and is committed to helping its students find jobs. If you're looking to turn coding into your career, you should consider Treehouse.

Read our full review of Treehouse…

Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.