Material Checkbox without Material UI (only CSS)
Lesson 4 / 6Course Lessons Outline▾
The main HTML is very simple, having just two key elements input and span.
<label>
<input type="checkbox" />
<span class="checkbox"></span>
</label>In order to create the checkmark it is nothing more than a bottom, and left border colored green. The key here is that it is then rotated 45deg to make it look like a check mark.
input:checked ~ .checkbox {
transform: rotate(45deg);
height: 125px;
width: 50px;
margin-left: 50px;
border-color: green;
border-top-color: transparent;
border-left-color: transparent;
border-radius: 0;
}This JavaScript is not required, it shows the checked status.
const input = Array.from(document.getElementsByTagName('input')).at(0);
const result = document.getElementById('result');
input.addEventListener('input', () => {
input.checked ? result.innerHTML = 'Checked: true' : result.innerHTML = 'Checked: false'
})Below is a fully working example!
how this course connects together.
Follow AJ through the layered stack topology from input contract to production output.
related deep dives.
View All→
The Odin Project 1: Web Development Foundations (HTML, CSS, Flexbox & JS Basics)
Master the complete Odin Project Foundations path modernized for 2026: how the web works, semantic HTML5, CSS Box Model & Flexbox, and JavaScript DOM fundamentals.

The Odin Project 5: Advanced HTML, CSS View Transitions & WCAG Accessibility
Build 60fps GPU-accelerated animations, multi-page Astro View Transitions, WCAG AAA focus rings, and accessible native <dialog> and Popover components.
