The border-bottom property is used in CSS and some special HTML tags. It only makes a border on the bottom side of the selected text, leaving the other three sides borderless. A background-color is not necessary for this property to work, but if you want to specify a specific border for the other sides of an object, use border-left, border-right, or border-top. If you want to specify a border for the whole area of text, then use border. The padding property can also be used to specify the border wrapping around the text.

You can use either thin, medium, thick, or any number in pixels to specify the thickness of the border. Any color will work, either in HTML color codes or valid color names. You can also use solid or dashed as the linetype of the border.

To apply this in an HTML document, use:

<span style="border-bottom:thin solid black;">Border this text</span>

That generates: Border this text

This is a border with the medium thickness applied: Border this text

This is a border with the thick thickness applied: Border this text

This is a border with the dashed linetype applied on a medium thickness border: Border this text

To apply this in CSS, in the h1 element for example, use:

h1 {
    border-bottom:5px solid black;

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.