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

HTML5 Semantic Tags | What do they mean

Remove Scrollbars from syntaxhighlighter

How to add Jquery easing effects | Jquery tutorial

Adding a button in HTML | styling a button

How CSS3 Works

Understanding ReactJS lifecycle methods

Advanced Jquery easing | Demo and Download