Semantic HTML: Use the Right Element for the Job

Think of HTML tags as pre-built components, not just style containers. Using `<button>` instead of a styled `<div>` gives you keyboard navigation and screen reader support for free. The biggest mistake is using generic `<div>`s for interactive elements.
Semantic HTML means using the right tag for the right job. Think of tags as pre-built components with free, built-in functionality, not just containers for styling. This is foundational for accessible design, ensuring your site works with screen readers and keyboards without extra code, while also improving SEO. The common footgun is using generic `<div>`s for everything, forcing you to reinvent accessibility features the browser provides for free.
Read the original → developer.mozilla.org
- #html
- #accessibility
- #ui design
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.