I keep getting told that the first child for .main-section needs to be a header…but it clearly is. The h1 element is directly below all main-section elements…I don’t understand what I am doing wrong.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Technical Documentation Page</title>
</head>
<body>
<!-- Navbar -->
<nav id="navbar">
<header>
<h1>Documentation</h1>
</header>
<a href="#introduction" class="nav-link">Introduction</a>
<a href="#HTML_Structure_and_Syntax" class="nav-link">HTML Structure and Syntax</a>
<a href="#Common_HTML_Elements" class="nav-link">Common HTML Elements</a>
<a href="#Working_with_Forms" class="nav-link">Working with Forms</a>
<a href="#HTML_Attributes" class="nav-link">HTML Attributes</a>
</nav>
<!-- Main documentation -->
<main id="main-doc">
<!-- Section 1: Introduction -->
<section class="main-section" id="introduction">
<h1>Introduction</h1>
<p>HTML, or <code>HyperText Markup Language</code>, is the standard language used to create and structure content on the web. Every webpage you visit is built using <code>HTML</code>, which defines the structure of the page through a series of tags.</p>
<p>At its core, <code>HTML</code> is simple and easy to understand. The language consists of a series of elements, each represented by opening and closing tags. These elements allow developers to create headings, paragraphs, forms, and more.</p>
</section>
<!-- Section 2: HTML Structure and Syntax -->
<section class="main-section" id="HTML_Structure_and_Syntax">
<h1>HTML Structure and Syntax</h1>
<p>HTML structure and syntax form the foundation of creating web pages. The basic structure of an HTML document begins with the <code><!DOCTYPE html></code> declaration, which informs the browser about the version of HTML being used.</p>
<p>HTML syntax relies on a set of rules to ensure proper rendering of content. Tags are used to define elements, and they typically come in pairs: an opening tag and a closing tag, with the closing tag including a forward slash (e.g., <code><p></code> and <code></p></code>).</p>
</section>
<!-- Section 3: Common HTML Elements -->
<section class="main-section" id="Common_HTML_Elements">
<h1>Common HTML Elements</h1>
<p>Common HTML elements are the building blocks of a webpage. They are defined using tags, which are enclosed in angle brackets. The most basic element is the <code><html></code> tag, which wraps the entire HTML document.</p>
<ul>
<li><code><html></code>: The root element</li>
<li><code><head></code>: Contains meta-information</li>
<li><code><body></code>: Contains the visible content</li>
<li><code><h1></code> to <code><h6></code>: Header tags</li>
<li><code><p></code>: Paragraph tag</li>
</ul>
<p>In addition to these, there are other frequently used elements. The <code><a></code> tag creates hyperlinks, allowing users to navigate between web pages or sections of a page.</p>
</section>
<!-- Section 4: Working with Forms -->
<section class="main-section" id="Working_with_Forms">
<h1>Working with Forms</h1>
<p>Forms are essential for collecting user input on websites. The <code><form></code> element contains various input types like text fields, checkboxes, radio buttons, and submit buttons. Each form field is usually paired with a <code><label></code> to improve accessibility, ensuring users understand what input is required.</p>
<p>HTML supports various input types to enhance user interaction on web forms. For text input, the <code><input type="text"></code> element is used, while for password fields, you use <code><input type="password"></code>.</p>
</section>
<!-- Section 5: HTML Attributes -->
<section class="main-section" id="HTML_Attributes">
<h1>HTML Attributes</h1>
<p>HTML attributes are used to provide additional information about elements. For example, the <code>href</code> attribute is used in anchor tags <code><a></code> to define the destination of a link, while the <code>src</code> attribute specifies the file path for images in an <code><img></code> tag.</p>
<p>Some of the most commonly used attributes include <code>id</code> and <code>class</code>. The <code>id</code> attribute uniquely identifies an element on a page, while the <code>class</code> attribute can group similar elements together.</p>
</section>
</main>
</body>
</html>