How to remove the default gap between H1 and other HTML elements | Using CSS



 Often it is required to remove the default gap between h1 and other HTML elements for this we have to set the values of margin and padding properties to 0.

Here is an Example:

<html>
 <h1>My heading</h1>
</html>

CSS  code to remove the gap

 h1{ margin:0; padding:0;}

Comments

Check out

CSS Sprites | What are They?

Login form | Using CSS3

Remove Scrollbars from syntaxhighlighter

Adding a button in HTML | styling a button

HTML5 Semantic Tags | What do they mean

How to remove plus and minus characters from input type number

HTML5 | LocalStorage

How CSS3 Works

jQuery Resources | Support and tutorial help