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

CSS border property

CSS border property

The border is a line drawn around the content and padding of an element. The shorthand border property has its own syntax. Let's look at the example: border: 4px solid black;.

These values define in the following order:

  • The stroke width of the border (4px)
  • Its style (solid)
  • Its color (black)

You can also set these things with individual properties like:

border-width

border-style

border-color

Top contributors

Alejandro Amsel

Topics

From Lesson

Share

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