CSS Borders

1. Border Width

The border-width property defines the thickness of the border. You can use pixels or keywords like thin, medium, and thick.

CSS

    You can set different widths for each side of the element:

    Tutorials dojo strip
    CSS




    2. Border Style

    The border-style property defines the style of the border. Common values include:

    • solid
    • dashed
    • dotted
    • double
    • groove
    CSS




    3. Border Color

    The border-color property defines the color of the border. You can use any CSS color format (name, HEX, RGB, etc.).

    CSS

    Set individual border colors for each side:

    CSS<br>




    4. Shorthand Border Property

    The shorthand border property combines width, style, and color in one line:

    CSS




    CSS Borders Example Code

    CSS




    CSS Labs

    conyin
    Tutorials dojo strip