HTML5 Semantic Tags
Real-Time Product Feedback Page
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Character encoding to support all languages and special symbols -->
<meta charset="UTF-8">
<!-- Responsive design: ensures mobile-friendly scaling -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO: Page title shown in browser and search engines -->
<title>Product Feedback | MyOnlineStore</title>
<!-- SEO: Description for search engines -->
<meta name="description" content="Submit product feedback for SmartWatch X2 and other electronics at MyOnlineStore. Help us improve your shopping experience!">
<!-- SEO: Relevant keywords -->
<meta name="keywords" content="SmartWatch, Electronics, Feedback, Online Store, Customer Reviews">
<!-- SEO: Author name -->
<meta name="author" content="MyOnlineStore Team">
<!-- SEO: Tell search engines to index this page and follow links -->
<meta name="robots" content="index, follow">
</head>
<body>
<!-- Header: Site branding -->
<header>
<h1>MyOnlineStore</h1>
<p>Your one-stop shop for smart electronics</p>
</header>
<!-- Navigation bar with page links -->
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="#products">Products</a></li>
<li><a href="#feedback">Feedback</a></li>
<li><a href="#summary">Ratings</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<!-- Main content of the page -->
<main>
<!-- Intro Section -->
<section id="intro">
<h2>Welcome!</h2>
<p>
Thank you for visiting <strong>MyOnlineStore</strong>. We’d love your feedback on our latest electronics.
<mark>Your opinion matters!</mark>
</p>
</section>
<!-- Product Section with article and figure -->
<section id="products">
<article>
<h2>SmartWatch X2</h2>
<figure>
<img src="smartwatch.jpg" alt="SmartWatch X2" width="200">
<figcaption>Track your health and stay connected with SmartWatch X2</figcaption>
</figure>
<!-- Expandable product specifications -->
<details>
<summary>Product Specifications</summary>
<ul>
<li>Battery: <time datetime="P7D">7-day life</time></li>
<li>Water Resistant: 50 meters</li>
<li>Connectivity: Bluetooth 5.0</li>
</ul>
</details>
</article>
</section>
<!-- Aside content: Stock alert -->
<aside>
<h3>Low Stock Alert</h3>
<p>Only a few SmartWatch X2 left:</p>
<meter value="3" min="0" max="10">3 of 10</meter>
</aside>
<!-- Feedback Form -->
<section id="feedback">
<h2>Submit Your Feedback</h2>
<form method="post" action="/submit-feedback">
<fieldset>
<legend>Customer Info</legend>
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" required><br><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required><br><br>
<label>Gender:</label><br>
<input type="radio" name="gender" value="Male" checked> Male
<input type="radio" name="gender" value="Female"> Female
<input type="radio" name="gender" value="Other"> Other<br><br>
</fieldset>
<fieldset>
<legend>Your Experience</legend>
<label for="product">Product:</label><br>
<select name="product" id="product">
<option value="smartwatch">SmartWatch X2</option>
<option value="earbuds">NoiseFree Earbuds</option>
<option value="laptop">LiteBook 15</option>
</select><br><br>
<label for="rating">Rate (1-5):</label><br>
<input type="range" name="rating" min="1" max="5"><br>
<progress value="4" max="5">4 out of 5</progress><br><br>
<label for="comments">Comments:</label><br>
<textarea id="comments" name="comments" rows="4" cols="50"></textarea><br><br>
</fieldset>
<button type="submit">Submit Feedback</button>
</form>
</section>
<!-- Data Summary in a Table -->
<section id="summary">
<h2>Recent Ratings</h2>
<table border="1">
<caption>Customer Review Summary</caption>
<thead>
<tr>
<th>Product</th>
<th>Average Rating</th>
<th>Top Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>SmartWatch X2</td>
<td>4.5</td>
<td>"Amazing battery and features!"</td>
</tr>
<tr>
<td>NoiseFree Earbuds</td>
<td>4.2</td>
<td>"Crisp sound and great fit."</td>
</tr>
</tbody>
</table>
</section>
</main>
<!-- Footer with contact information -->
<footer id="contact">
<address>
Email: <a href="mailto:support@myonlinestore.com">support@myonlinestore.com</a><br>
© <time datetime="2025-06-27">2025</time> MyOnlineStore Inc.
</address>
</footer>
</body>
</html>
✅ Summary of Semantic & SEO Features
Feature | Purpose | Benefit |
---|---|---|
<!DOCTYPE html> | Declares HTML5 document | Enables HTML5 parsing |
<header> , <footer> | Defines header/footer areas | Improves structure & screen reader navigation |
<nav> | Main navigation links | SEO & accessibility-friendly menus |
<main> , <section> | Groups main content | Better layout semantics |
<article> , <figure> | Self-contained product info | SEO-rich content blocks |
<details> & <summary> | Expand/collapse specs | Compact UX |
<form> , <fieldset> | Collects user feedback | Structured inputs |
<table> | Displays summarized rating data | Great for screen readers & structured info |
<meta name="viewport"> | Mobile-friendly scaling | Responsive design |
<meta name="description"> , keywords , author , robots | SEO tags | Boosts search ranking & control over indexing |
<meter> , <progress> | Visual indicators | Modern UI components (no CSS needed) |
<address> | Marks contact info | Improves bot parsing & accessibility |
Comments
Post a Comment