Should I use tab or spacebar to indent my coding? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Should I use tab or spacebar to indent my coding?

Hi! I'm new to coding and I am currently learning HTML. I was wondering if I should use tab or spacebar to indent my coding, I searched it up and it seemed to be a pretty big debate in the coding community and I'm still not sure what to use. Thanks!

18th Mar 2019, 11:27 AM
Brendon Luu
Brendon Luu - avatar
2 ответов
+ 1
Space should be preferred since it avoids conflicts if used in other editors or compilers. Usually you can set your tab to print 4 spaces (or also 2 or 8), so there won't be a big difference in terms of comfort using this setting.
18th Mar 2019, 11:39 AM
Matthias
Matthias - avatar
+ 1
Doesn't matter. Different projects use different convensions. If you're doing your own do whatever you like.
18th Mar 2019, 11:44 AM
Vlad Serbu
Vlad Serbu - avatar