*
All CSS not showing in online page, but show on view source with css link.
In HTML every tag takes global css margin and padding. If we don’t give any css.
<h1>Heading</h1> <p>Hello</p>
[codepen_embed height=”265″ theme_id=”0″ slug_hash=”QMLQeG” default_tab=”html,result” user=”pradeepanvi”]See the Pen HTML by default Global CSS by Pradeep Kumar (@pradeepanvi) on CodePen.[/codepen_embed]
We can give there manual css margin and padding
body{margin:0;padding:0;} h1{margin:0;padding:0;} p{margin:0;padding:0;}
[codepen_embed height=”265″ theme_id=”0″ slug_hash=”mMboNO” default_tab=”css,result” user=”pradeepanvi”]See the Pen manual css by Pradeep Kumar (@pradeepanvi) on CodePen.[/codepen_embed]
Now with * css
*{margin:0;padding:0;}
[codepen_embed height=”265″ theme_id=”0″ slug_hash=”eEOXoQ” default_tab=”css,result” user=”pradeepanvi”]See the Pen What does * css by Pradeep Kumar (@pradeepanvi) on CodePen.[/codepen_embed]
What is * css
* css means target global. If we need to give more than one selector css, just simply use * css.