Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
163
rated 0 times [  170] [ 7]  / answers: 1 / hits: 22074  / 13 Years ago, tue, october 11, 2011, 12:00:00

When we want to give some formatting to code to make it more readable. We can use both Tab and Space (by pressing space bar on keyboard). Many time I give space manually.



I've some confusions




  • Is there any difference between them?

  • Is using tab better than spaces?

  • Does using space increase the size of document and tab not?

  • Is there any differences between single tab/space and multiple. in terms of page size?

  • Is there any difference on using tab or space in HTML, CSS and Javascript?



Dreamweaver has this option in preferences



enter


More From » html

 Answers
36

Tabs need less characters and are formatted by users (some display as 2, some as 4 spaces), what can make some code look bad on some other environment.



Spaces consume more KBs but look equal everywhere.



Good editors have retab-functions to convert those.



In JS and CSS it does not matter, HTML should not matter, but can in some cases.


[#89677] Monday, October 10, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alora

Total Points: 284
Total Questions: 99
Total Answers: 92

Location: Singapore
Member since Sat, Jul 25, 2020
4 Years ago
;