setting vertical spacing between text in html
I ha开发者_如何学Cve some heading one after other on each line. Now i want to make sure that the vertical space between headings is x pixels between heading 1 and heading 2 , and y pixcles between heading 3 and 4. How can i ensure it?
Add some margin-bottom
to heading 1 and 3.
html:
<h1>Heading One</h1>
<h2>Heading Two</h2>
<h3>Heading Three</h3>
<h4>Heading Four</h4>
css:
h1 {
margin-bottom: Xpx;
}
h3 {
margin-bottom: Ypx
}
use style for it,
1) For first header like
<h1 style="padding-top:10px;padding-bottom:10px;">First Header</h1>
<h1 style="padding-top:10px;padding-bottom:10px;">Second Header</h1>
精彩评论