Semantic HTML and Page Structure
メニューを表示するにはスワイプしてください
So far, you've learned how to build elements on a web page. Now let's improve how your content is structured and understood.
What Is Semantic HTML?
Semantic HTML means using elements that clearly describe the purpose of your content.
Instead of using generic containers like <div>, you use meaningful tags like:
<header>;<nav>;<section>;<article>;<footer>.
Why It Matters
- Helps browsers and developers understand your page structure;
- Improves accessibility (screen readers rely on this);
- Helps search engines better interpret your content.
Common Semantic Elements
<header>
Represents the top part of a page or section (logo, title, navigation).
<header>
<h1>My Website</h1>
</header>
<nav>
Defines navigation links.
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
</ul>
</nav>
<section>
Groups related content.
<section>
<h2>Services</h2>
<p>We offer web development...</p>
</section>
<article>
Represents standalone content (e.g., blog post).
<article>
<h2>Blog Post</h2>
<p>Content goes here...</p>
</article>
<footer>
Defines the bottom part of a page.
<footer>
<p>© My Website</p>
</footer>
How It Looks Together
index.html
Note
Don't try to memorize all tags. Focus on understanding when to use each one.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 21
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 21