Tania Rascia Web Design and Development

Skip Navigation
Basic HTML5 Skeleton File

Basic HTML5 Skeleton File

/ 8 responses

I often like to start my projects from scratch and stray away from using frameworks. HTML5 Boilerplate is a really great resource for creating a style-agnostic web project foundation; all your bases will be covered. However, it’s much more than I need for a standard project, and I’d waste more time deleting what I don’t need than I’d save for the convenience.

A minimal index.html file should always contain a few things, though.

Declare the document type

<!doctype html>HTML5.

Define the character coding

<meta charset="utf-8"> UTF8.

Define the width of the viewport

<meta name="viewport" content="width=device-width, initial-scale=1">
Optimize for mobile and prevent zoom/horizontal scroll.

Make browsers render elements consistently with a CSS reset.

Normalize.css is a good option.

Include jQuery library (optional)

Google generously provides hosted libraries

Include links to Custom CSS and JavaScript

css/style.css and js/scripts.js are acceptable paths.

Use the latest Internet Explorer rendering mode (optional)

<meta http-equiv="x-ua-compatible" content="ie=edge">Not mandatory, but might be helpful.

Basic index.html

<!doctype html>
<html lang="en">

  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">


  <link rel="stylesheet" href="css/main.css">
  <link rel="icon" href="images/favicon.png">


  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  <script src="js/scripts.js"></script>


The Author

Thank you for reading! I'm Tania Rascia, and I write no-nonsense guides for designers and developers. If my content has been valuable to you, please help me keep the site ad-free and continuously updated with quality tutorials and material by making a donation. Any amount helps and is greatly appreciated!

Write a response

Your email address will not be published.


Tania's List

My tutorials, guides, and articles for web designers, developers, and autodidacts, sent out once a month or so. No bullshit, ads, or tricks.