The standard way to create HTML borders is to use CSS. Using CSS, you can create a border around any HTML element.
There are a range of CSS properties that you can use to define borders but the shorthand
border property is the most concise way.
Below are some examples of what you can do with HTML, borders, and CSS.
You can use
border-radius to create rounded corners.
For a full list of border properties, check out the list of CSS properties and filter by "border".
You can combine different border types and styles for each side of the HTML element.
Embedded Styles or External Styles?
All of the above examples use embedded styles to create the borders. You can also use external styles to apply the styles across multiple pages or a whole website. To do this, simply copy everything between the
style tags and put it into your external style sheet, then replace the
style tags with a
link tag that points to your external style sheet.