basic html website template code example

Example 1: html template

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Page Title Goes Here</title>
  <meta name="description" content="Description Goes Here">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  // if scripts is required add:
  <script src="js/scripts.js"></script>
</body>
</html>

Example 2: html template

<!DOCTYPE>
<html>
  <head>
    <title>Title</title>
    
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="style.css">
  </head>
  
  <body>
    
  </body>
</html>

Example 3: basic html template

Basic Html Template:
<html>
  <head>
    <title>
    	/* document title here */
    </title>    
    /* document meta information and external file include written here */
  </head>
  <body>
  	/* document body goes here */
  </body>
</html>

Example 4: basic html template

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

Example 5: html templates

<!DOCTYPE html>
<html lang="en">
  <head>
    <!--Meta Info-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>My Website</title>
    
    <!-- Website Icon -->
    <link rel="icon" href="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png" type="x_icon">    
    <!-- import the webpage's stylesheet -->
    <link rel="stylesheet" href="style.css">

    <!-- import the webpage's javascript file -->
    <script src="script.js" defer></script>
  </head>  
  <body>
  </body>
</html>

Example 6: html template

<!doctype html>
<!--[if IE 8]><html lang="pt-br" class="no-js ie8 oldie"><![endif]-->
<!--[if IE 9]><html lang="pt-br" class="no-js ie9"><![endif]-->
<!--[if gt IE 9]><!-->
<html lang="pt-br" class="no-js">
<!--<![endif]-->
<head>
	<base href="">
	<meta charset="utf-8"/>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="msapplication-tap-highlight" content="no">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="theme-color" content="#111111" />
	<meta name="description" content=""/>
	<title></title>
	<link rel="author" href="humans.txt">
	<link rel="manifest" href="manifest.json" />
	<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png">
	<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
	<link rel="apple-touch-icon" sizes="57x57" href="apple-touch-icon-57x57-precomposed.png">
	<link rel="apple-touch-icon" sizes="57x57" href="apple-touch-icon.png">
	<link rel="shortcut icon" sizes="16x16" href="favicon.ico">
	<link rel="stylesheet" media="all" href="styles/index.css">
</head>
<body>
	<!-- fallback -->
	<noscript>You need to enable JavaScript to run this app.</noscript>

	<!-- app -->
	<main id="root" role="main"></main>

	<!-- libraries - scripts at the bottom for fast page loading -->
	<script src="scripts/index.js"></script>
</body>
</html>

Tags:

Html Example