ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)

Set your Publisher ID in src/config/ads.ts to display live ads.

W3.CSS Tutorial• 5 min read

Buttons, Badges, Tags & Hover Effects

w3-button vs w3-btn, ripple effects, rounded borders, and pill tags

W3.CSS provides button classes with built-in hover transitions, rounded corners (w3-round), and numerical notification badges.

Buttons vs Standard Links

w3-button: A modern flat button with a subtle grey hover background by default.

w3-btn: A raised button with a subtle box-shadow and hover shadow elevation.

Hover modifiers: w3-hover-red, w3-hover-green, w3-hover-text-yellow customize hover state colors.

Badges & Tags: w3-badge renders circular notification counts; w3-tag renders rectangular status tags.

Buttons with Notification Badges
<button class="w3-button w3-blue w3-round-large w3-hover-dark-grey">
  Inbox <span class="w3-badge w3-red w3-margin-left">5</span>
</button>

<span class="w3-tag w3-green w3-round">VERIFIED</span>
<span class="w3-tag w3-amber w3-round">PENDING</span>
Badges display item counts; tags present categorized status pills.
ADVERTISEMENT
Google AdSense Slot (inContentBanner)

Set your Publisher ID in src/config/ads.ts to display live ads.

Test Yourself With Exercise

+15 XP

Which class renders a circular numerical counter, commonly used for unread inbox notification badges?