开发者

setting vertical spacing between text in html

开发者 https://www.devze.com 2023-02-14 01:49 出处:网络
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 hea

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消