Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
christian lian huat toh
7,213 PointsHTML default margin
does html tags have default margin? if yes how much margin does it have by default?
2 Answers
Philip Gales
15,193 PointsTo elaborate on mathisvester's answer, you want to use a normalize.css file because each browser (Chrome, Safari, Firefox etc...) will add different margins to each element. Using the normalize file will allow your website to look the same/similar on all browsers.
christian lian huat toh
7,213 Pointsit's much clearer for me now :D thanks for the immediate response guys :D
mathisvester
13,451 Pointsmathisvester
13,451 PointsHi Christian,
in general HTML Tags have no margin. There are HTML Elements such as the Headline Element (<h1></h1>...) for example which have a default stylings depending on the User Agent Stylesheet. You should use the normalize.css to reset these default stylings. Then you can apply your own stylings in another stylesheet to make sure your margin of an element is at a specific value for example.