+ 8

Code Spacing

May I know why thrs space like <p class="serif"> This is a paragraph </p> Instead of typing <p class="serif"> this is a paragraph </p> Is there any difference? Thanks

13th Jan 2018, 2:51 PM
Lun
Lun - avatar
4 odpowiedzi
+ 3
there isn't any difference between the two. it's just a syntax habbit, some guys like their code with alot of spaces while some guys like their code with going one line down Everytime they adding something new.
13th Jan 2018, 2:56 PM
Cain Eviatar
Cain Eviatar - avatar
+ 3
Ok thanks!
13th Jan 2018, 3:25 PM
Lun
Lun - avatar
+ 2
it's all about code readability. this spacing called code indentation. by that you co-workers can easily read your code while development process. some developer minify them in just on line using npm packages for production server so it can be optimised for better speed
13th Jan 2018, 3:04 PM
amin charoliya
amin charoliya - avatar
+ 1
if you use the spacing habbit it will reduce the time of finding the error in your code. sorry for the English
16th Jan 2018, 8:14 AM
RHYAN DAVE ABORDO
RHYAN DAVE ABORDO - avatar