Native vs Custom: When to Reach for a Real Element
Why a real button beats a styled span every time.
The Core Choice
For any control you face one choice: use a native HTML element or hand-build a custom one. Native almost always wins.
A Real Button Just Works
A native button is focusable, clickable by mouse, keyboard, and touch, and announced correctly. You write one tag and the platform does the rest.
<button>Buy now</button>All lessons in this course
- Tags Have Meaning: Why div Soup Fails
- Text Elements: Paragraphs, Lists, and Emphasis
- The Accessibility Tree: What Screen Readers Hear
- Native vs Custom: When to Reach for a Real Element