<?xml version="1.0" encoding="utf-8"?>

CSS border property

CSS border property Bad Practice
CSS border property Best Practice

Don't confuse the element's outline and border! The border's goal boils down to specifying the element's existence and marking up its container dimensions.

For setting up borders, web developers use the border property, allowing them to modify each edge differently — different width, color, or style. An outline is the same on all sides. Also, borders can change the element's size or width, overlapping with the element's parts.

Improve your UX & Product skills with interactive courses that actually work