Languages
[Edit]
EN

HTML - basic html 5 template

9 points
Created by:
Greg
1505

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

1. Only body element example

// ONLINE-RUNNER:browser;

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

2. head + body elements example 1

// ONLINE-RUNNER:browser;

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

3. 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>

4. 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>

5. 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>

 

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.