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

Adding a button in HTML | styling a button

How CSS3 Works

HTML5 | LocalStorage

Advanced Jquery easing | Demo and Download

How to add Jquery easing effects | Jquery tutorial