Headline with the h1 Element

Tell us what’s happening:

I just have a “I would like to understand” why the H1element is written on line 2 instead of line 1? Is this standard procedure? Need to understand logic/reasoning behind why we do what we do and not just do for the sake of doing thanks.

Your code so far

<h1>Hello World</h1>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1.

Link to the challenge:

No particular reason. HTML largely ignores whitespace, and you can have as many blank lines above that <h2> line (though you might not want to do that in practice)

1 Like

I didn’t design the challenge, but I would assume it was just for readability.

You can be very flexible with white space in HTML so this allows you to give your code appropriate breathing room.

Semantically it makes no difference, but it’s easier on the eyes in the browser window.

1 Like

Thank you so much everyone! I’m brand new to the coding world with very limited knowledge and experience but I am driven with a passion for learning. Greatly appreciate the love and support from all of you! Thank you!