structure of html code example

Example 1: html basic structure

<!DOCTYPE html>
<html>
  
  <head>
  	<title>Some Title</title>
    <link href="css_file.css" rel="stylesheet"> <!-- external CSS -->
  </head>
  
  <body>
    <!-- main content -->
  </body>
  
</html>

Example 2: html body structure

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

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Code Breaker</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <header>
        <h1>Give A Like if you see this heading</h1>
    </header>
    <nav>
        <ul>
            <li>Wrote it simpler to easily delete.</li>
            <li>Home</li>
            <li>Services</li>
            <li>About Us</li>
            <li>Contact</li>
        </ul>
    </nav>
    <section>
        Havn't you liked this answer yet!
    </section>
    <footer>
        Copyright &copy; 2020-2030
    </footer>
</body>

</html>

Example 3: html structure

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>

</body>
</html>

Example 4: structure of an html document

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>A website</title>
  </head>
  <body>
  	...
  </body>
</html>

Example 5: html basic structure

<!DOCTYPE html>
<head>
	<!-- Miscellaneous Stuff Here -->
</head>
<body>
	<!-- Main Divs here -->
</body>

Tags:

Html Example