Preformatted text### Tell us what’s happening:
I have linked my CSS file, but I keep getting this: my technical documentation page needs atleast one media quiery.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Development Basics</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav id="navbar">
<header>Web Dev Basics</header>
<a class="nav-link" href="#Introduction">Introduction</a>
<a class="nav-link" href="#HTML_Fundamentals">HTML Fundamentals</a>
<a class="nav-link" href="#CSS_Basics">CSS Basics</a>
<a class="nav-link" href="#Responsive_Design">Responsive Design</a>
<a class="nav-link" href="#Best_Practices">Best Practices</a>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header>Introduction</header>
<p>Welcome to Web Development Basics documentation.</p>
<p>This guide covers essential concepts for beginners.</p>
</section>
<section class="main-section" id="HTML_Fundamentals">
<header>HTML Fundamentals</header>
<p>HTML is the backbone of web pages.</p>
<p>Basic HTML structure:</p>
<code>
<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>
</code>
<p>Use semantic tags for better structure.</p>
</section>
<section class="main-section" id="CSS_Basics">
<header>CSS Basics</header>
<p>CSS styles your HTML content.</p>
<p>Simple CSS example:</p>
<code>
body {
font-family: Arial;
color: #333;
}
</code>
<p>You can link CSS using:</p>
<code><link rel="stylesheet" href="styles.css"></code>
</section>
<section class="main-section" id="Responsive_Design">
<header>Responsive Design</header>
<p>Make websites work on all devices.</p>
<p>Use media queries:</p>
<code>
@media (max-width: 600px) {
nav { width: 100%; }
}
</code>
<p>Flexible layouts are key.</p>
</section>
<section class="main-section" id="Best_Practices">
<header>Best Practices</header>
<p>Follow these guidelines:</p>
<ul>
<li>Write clean, readable code</li>
<li>Use meaningful variable names</li>
<li>Keep files organized</li>
<li>Comment your code</li>
<li>Test across browsers</li>
</ul>
<p>Consistency is crucial.</p>
<code>/* Always add comments */</code>
</section>
</main>
</body>
</html>
@teller Thanks again; forum here is the code and i can’t tell why the hint keep saying i should have at least one @media query, which i have and i have linked my css to the html file.
Your code passes.
Reset the step and try again. If that doesn’t work, refresh the page, disable dark mode, disable ad blockers. Or, use another browser.
If the above steps do not work, you may need to restart the computer.
Your solution works from my end. Please try one of the following steps to move forward.
Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.
or - Try the step in incognito or private mode.
or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.
or - Ensure your browser is up-to-date or try a different browser.