Below are some examples of what you can do with HTML, borders, and CSS.
This code results in:
This code results in:
This code results in:
This code results in:
This code results in:
This code results in:
This code results in:
This code results in:
You can combine different border types and styles for each side of the HTML element.
This code results in:
Use embedded style sheets if you need to apply the same border to multiple objects on the same page. Use external style sheets if you need to apply the same border to multiple objects on multiple pages (or across your whole site).
Solid Border
This code results in:
HTML borders are best created with CSS.
Dotted Border
This code results in:
HTML border code - or should that read CSS border code?
Dashed Border
This code results in:
HTML border code - or should that read CSS border code?
Outset Border
This code results in:
HTML border code - or should that read CSS border code?
Inset Border
This code results in:
HTML border code - or should that read CSS border code?
Grooved Border
This code results in:
HTML border code - or should that read CSS border code?
Double Border
This code results in:
HTML border code - or should that read CSS border code?
Ridged Border
This code results in:
HTML border code - or should that read CSS border code?
Mixed Border
You can combine different border types and styles for each side of the HTML element.
This code results in:
Create borders for any HTML element.
Inline, Embedded, or External?
All of the above examples use "inline" styles to create the borders. You can also use "embedded" style sheets or "external" style sheets. In fact, embedded style sheets are more powerful than inline styles. And external style sheets are more powerful than embedded style sheets.Use embedded style sheets if you need to apply the same border to multiple objects on the same page. Use external style sheets if you need to apply the same border to multiple objects on multiple pages (or across your whole site).