css Beginner
Outline HTML elements
Interactive editor — edit code and see live results
Open in Editor
Select all selector and the outline
* {
outline: 1px solid red;
}
Summary
- Add the above code to your main CSS file to take effect.
- Select all selector targets all HTML elements and adds outline to them.
Try this in our interactive code editor
Practice hands-on with our built-in code sandbox.
Open Code Editor
Adrian Bigaj
Creator of BigDevSoon
Full-stack developer and educator passionate about helping developers build real-world skills through hands-on projects. Creator of BigDevSoon, a vibe coding platform with 21 projects, 100 coding challenges, 40+ practice problems, and Merlin AI.
Related Pills
css Beginner
Adjust box sizing in CSS
Adjust box-sizing property to include padding and border to actual width or height. Simplifies overhead of the box model.
css Beginner
Place HTML Elements Absolutely with CSS
Use a combination of position relative and absolute to place text on the image card.
css Beginner
CSS Animated Accordion
Smooth open/close animations on native details elements using interpolate-size — no JavaScript height measurement.