HTML: Headings


<h1>Heading 1</h1>

Heading 1


<h2>Heading 2</h2>

Heading 2


<h3>Heading 3</h3>

Heading 3


<h4>Heading 4</h4>

Heading 4


<h5>Heading 5</h5>
Heading 5

<h6>Heading 6</h6>
Heading 6

The code used for index.php is below:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../styles.css">
    <title>Headings in HTML</title>
</head>
<body>

<h1 class="lesson-h1">HTML: Headings</h1>

    <?php

        $headings = 6;
        $num = 1;

        for($i = 0; $i < $headings; $i++){
            
            $line = "<h$num>Heading $num</h$num>";
            echo "<hr><span>" . htmlentities($line) . "</span> <br> " . $line;
            $num++;
        }

        include('../show_code.php');
        show_code('index.php');
    ?>    
    
</body>
</html>