Is any way to remove empty space in top of the h tags?
h1 {
border: 1px solid;
margin: 0;
padding: 0;
line-height: normal;
}
<h1>Test Title yg</h1>
On
You can use line-height: calc(1em + 2px); to remove some space, but there is a reason why the space is available. On the bottom of "g" and "y" there is some space to the border. With the line-height: calc(1em + 2px); you can remove this space but not the space above "T". There can be characters like ÄÖÜ (in german) who need some space above and characters like gyq who need some space below.
h1 {
border: 1px solid;
margin: 0;
padding: 0;
line-height: calc(1em + 2px);
}
<h1>Test Title yg</h1>
You should be looking for :
Hope this is what you are looking for!
But this space is needed for HTML special characters.
Please have a look at HTML characters here