Skip to content
Advertisement

Does anybody know why my is so far away from the line above it? [closed]

css file:

css file

what gets printed:

what gets printed

html file if it even necessary:

html file if it even necessary

Advertisement

Answer

You need to keep in mind that HTML elements come with default styling and each browser is slightly different. Then you need to use the browser developer tools to debug your code. Right click on your HTML element and select inspect.

enter image description here

Now highlighting over your HTML elements will display your margins, border, padding of the selected element, so you can see your h1 has a top and bottom margin applied, remember its default styling applied by the browser.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement