+ 1
Is the spacing important?
The way they themselves have written the code. Like it is not directly beneath each other but in a kind of a sequence. Like the <html> tag in the top most left corner as starting but the body tag kind of moves towards the middle. Are you supposed to keep a certain distance or can you just write the codes beneat eachother like <html> <head> </head> <body> </body> Rather than how they show <html> <head> </head> <body> This is the first line of text. </body> </html>
5 Respostas
+ 2
You mean indentation?
Typing(){
like this} ;
Instead of
Typing(){like this};
HTML ignores whitespace, paragraphs, spaces and indentation, it's only there so the code is easy to read - oftentimes you'll work on a group project and these are just common practices - it varies from language to language, from dev to dev and from company to company.
If you wish you can write all your HTML in a single line, the page will be displayed just the same!
+ 5
Depends on who/what reads the code.
+ 3
What spacing? Please clarify your question.
+ 1
Spacing is not necessary in HTML. It's only used to increase readability.
+ 1
Adding:
If you're not planing to work with others, you can type it the way you like, SoloLearn is just showing the most common use