You want to stylize the borders on the top and bottom of a heading, as shown below:
Use the border-top and border-bottom properties when setting the style for the heading:
h2 {
font: bold italic 2em Georgia, Times, "Times New Roman", serif;
border-bottom: 2px dashed black;
border-top: 10px solid black;
margin: 0;
padding: 0.5em 0 0.5em 0;
font-size: 1em;
p {
margin: 0;
padding: 10px 0 0 0;

In addition to top and bottom borders, a block-level element also can have a border on the left and right  sides via the border-left and border-right properties, respectively. The border-top, border-bottom, border-left, and border-right properties are shorthand properties that enable developers to set the width, style, and color of each side of a border.

Need Help? Just Ask Your Question Below In Comment BoxAsk Now

You want to use CSS properties to design a heading that is different from the default. For example, you want to put the border around heading.

Post a Comment

V. Kapoor

{picture#} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is a author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#} {twitter#} {google#}
Fox Infotech. Powered by Blogger.