Ask about script HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Ask about script HTML

I am newbie and learnt script HTML last night like this: <html> <head> <title>first page</title> </head> <body> This is a line of text. </body> </html> Is this work if I put this script be like this (put script HTML on alignment left): <html> <head> <title>first page</title> </head> <body> This is a line of text. </body> </html> Thank you before :)

8th Jul 2019, 3:01 AM
B-13
B-13 - avatar
5 Answers
+ 6
Yes it works, the reason we have space between each section is to look clean If you put space between each section , people who are reading your code do understand much better... But overall it's work same
8th Jul 2019, 3:04 AM
KingDaniel2004
KingDaniel2004 - avatar
+ 5
Aulia Nasution your welcome, enjoy coding 😀
8th Jul 2019, 3:09 AM
KingDaniel2004
KingDaniel2004 - avatar
+ 4
Also html is not really called a script.
8th Jul 2019, 3:51 AM
Sonic
Sonic - avatar
+ 3
It really fast respond Thank you "King" and "mod" for the answer my question Case closed :)
8th Jul 2019, 3:08 AM
B-13
B-13 - avatar
+ 2
You can put the whole file on a single file line and it will work. But readability is important so we do one line per html tag and indentations to indicate that tags are children of others. This actually will tie in to the DOM when you learn Javascript as u understanding how ot all nests together will be helpful. Also with CSS.
8th Jul 2019, 3:49 AM
Adam
Adam - avatar