Skip to main content

CSS Outline Width

How thick an outline looks depends on the outline-width property, which accepts one of these values:

  • thin — typically 1px.
  • medium — typically 3px.
  • thick — typically 5px.
  • a size of your own — in px, pt, cm, em, and so on.

CSS Outline Width Examples

Outlines can differ in width, as shown here.

Example

Four paragraphs, with one outline width each: thin, medium, thick, and 8px.

Prompt
An HTML page that demonstrates different outline-width values. In an internal <style> block, give paragraphs padding, a solid green outline, then four classes with outline-width thin, medium, thick, and 8px. Add a labeled paragraph for each.
Output: complete HTML page