MÓDULO_TEÓRICO
Modern Semantics for Dashboards

The Skeleton of a Professional Control Panel
In modern web development, packing your markup with <div><div><div> (often called Divitis) is considered bad practice. Browsers, search engines, and screen readers require semantic tags to understand the role of each section.
In this lesson, we will structure the complete semantic layout of our Nexus Dashboard.
1. Structure Landmark Tags
<header>: Top bar with global search, connection status, and profile avatar.<aside>: The navigation sidebar.<nav>: Group of primary navigation links.<main>: The central area housing Dashboard data.<section>: Thematic blocks (e.g. "Metric Cards", "Charts", "Recent Activity").<article>: Self-contained independent content (e.g. an individual metric card).
2. Dashboard HTML Structure
html<div class="dashboard-layout"> <!-- 1. Sidebar --> <aside class="sidebar" aria-label="Main Navigation"> <div class="logo"> <span class="logo-icon">⚡</span> NexusOS </div> <nav class="sidebar-nav"> <ul> <li><a href="#overview" class="active">📊 Overview</a></li> <li><a href="#analytics">📈 Analytics</a></li> <li><a href="#users">👥 Users</a></li> <li><a href="#security">🛡️ Security</a></li> </ul> </nav> </aside> <!-- 2. Main Wrapper --> <div class="main-wrapper"> <!-- Top Header --> <header class="topbar"> <div class="search-box"> <input type="search" placeholder="Search metric or node ID..."> </div> <div class="user-profile"> <span class="status-dot"></span> <span class="user-name">Agent Kane</span> </div> </header> <!-- Main Dashboard Content --> <main class="dashboard-content"> <!-- Section: Metric Cards (Widgets) --> <section class="metrics-grid"> <article class="metric-card"> <h3>Total Revenue</h3> <p class="metric-value">$124,592</p> <span class="metric-trend positive">+14.2%</span> </article> <article class="metric-card"> <h3>Active Users</h3> <p class="metric-value">8,420</p> <span class="metric-trend positive">+8.1%</span> </article> <article class="metric-card"> <h3>Error Rate</h3> <p class="metric-value">0.02%</p> <span class="metric-trend negative">-0.05%</span> </article> </section> <!-- Section: Recent Activity Table --> <section class="table-section"> <h2>Active Nodes Registry</h2> <table class="data-table"> <thead> <tr> <th>Node ID</th> <th>Region</th> <th>CPU Load</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td>#NX-902</td> <td>US-East</td> <td>34%</td> <td><span class="badge online">Active</span></td> </tr> <tr> <td>#NX-408</td> <td>EU-Central</td> <td>89%</td> <td><span class="badge warning">High Load</span></td> </tr> </tbody> </table> </section> </main> </div> </div>
3. Accessible HTML Tables
Notice how we use <thead> (header), <tbody> (body), <th> (header cell), and <td> (data cell). This allows browsers and assistive tech to parse tables reliably.
