Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Defining Line spacing between Header tags

Tags:

html

tags

Is there a way of defining the line spacing between headers. I know using various header tags(h1, h2, h3) have various line spacing and I was wondering if there's a way of defining a line spacing for all of them, so that they are consistent and fluid throughout the page?

There are lots of articles on using margin and such, but I'm not too sure about it.

like image 912
Jeiman Avatar asked Sep 07 '13 23:09

Jeiman


1 Answers

Most suggest using a line-height of 1.45 for h1~h6 so that would be:

h1, h2, h3, h4, h5, h6 {
  line-height: 1.45;
}

The recommended method for defining line height is using a number value, referred to as a "unitless" line height. A number value can be any number.

like image 67
Michael Moriarty Avatar answered Oct 19 '22 02:10

Michael Moriarty