Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

H1 tag still has a padding or margin on the bottom even though none set

Tags:

html

css

H1 tag still has a padding or margin on the bottom even though none set.

I have a h1 tag and a bit of text underneath. I set margin and madding to 0 on both and the text still does not sit right underneath the h1 text.

I have created a js fiddle to illustrate my point

http://jsfiddle.net/6hCrC/

like image 481
RSM Avatar asked Jun 15 '12 10:06

RSM


Video Answer


1 Answers

There is no padding. There is just space allocated by the default line-height and no characters with descenders (like p, q, and g) in the text.

http://jsfiddle.net/6hCrC/1/

like image 183
Quentin Avatar answered Oct 20 '22 21:10

Quentin