CSS Tutorial
Borders are visual elements that define the edges of elements on a web page. They can be used to improve the visual appeal of a design or to separate different sections of content.
border-width
: This property defines the width of the border in pixels.border-style
: This property defines the style of the border. Examples of border styles include solid
, dashed
, and dotted
.border-color
: This property defines the color of the border.border-radius
: This property defines the radius of the corners of the border.h1 {
border-width: 1px;
border-style: solid;
border-color: black;
border-radius: 5px;
}
This example will add a 1px wide, solid, black border with 5px rounded corners to all <h1>
elements on the web page.
solid
, dashed
, or dotted
.