Languages
[Edit]
EN

HTML - basic HTML 5 template

12 points
Created by:
Creg
9360

For each project, the basic HTML 5 template looks always in the following way.

1. Only body element example

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  Web page content here...
</body>
</html>

2. body + script element example

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <script>
    // script here
  </script>
</body>
</html>

3. head + body elements example 1

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <!-- head tags here... -->
</head>
<body>
  Web page content here...
</body>
</html>

4. head + body elements example 2

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>
    /* style here */
  </style>
  <script>
    // script here
  </script>
</head>
<body>
  Web page content here...
</body>
</html>

5. head + body elements example 3

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Example template</title>
  <link rel="stylesheet" href="path/to/my/styles.css" />
  <script type="text/javascript" src="path/to/my/script.js"></script>
</head>
<body>
  <p>Web page text...</p>
</body>
</html>

6. head + body elements example 4

// ONLINE-RUNNER:browser;

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Example template</title>
  <meta name="description" content="Example template description." />
  <meta name="author" content="dirask.com" />
  <link rel="stylesheet" href="path/to/my/styles.css" />
  <style>

    /* Place for styles */

  </style>
  <script type="text/javascript" src="path/to/my/script.js"></script>
</head>
<body>
  <p>Web page text...</p>
  <script>

    alert('Hello world!');  

  </script>
</body>
</html>

 

See also

  1. XHTML - basic XHTML 5 template 

Alternative titles

  1. HTML - basic HTML5 template
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

HTML table

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join