Semantic elements are essential for accessibility, SEO, and modern web technologies.
This section provides guidance on building a structured and valid website using Atomix.
Note: While Atomix encourages semantic HTML, some elements are mandatory for Atomix to work properly.
🏗️ Building a Site with Atomix
To ensure proper functionality, follow these basic structure guidelines:
✅ Add the body class to the <body> tag.
✅ Use semantic elements like <header>, <main>, and <footer>, each with a corresponding class (header, main, footer).
✅ Assign specific classes to elements:
<p> should have the paragraph class.
<a> should have the link class.
✅ Structure your content with meaningful containers (<article>, <section>, etc.).
✅ Validate your code using the W3C Validator.
📝 Basic HTML Template
Here's a minimal Atomix-ready HTML template:
<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="ie=edge"><title>Atomix Tester</title><linkrel="stylesheet"href="https://cdn.jsdelivr.net/gh/enioaiello/atomix/dist/atomix.min.css"></head><bodyclass="body"><headerclass="header"><navclass="navbar"><!-- Navigation content here --></nav></header><mainclass="main"><!-- Main content here --></main><footerclass="footer"><!-- Footer content here --></footer></body></html>
🔝 Navbar Template
The navbar is essential for navigation.
It includes a logo, menu, separators, and icons.