What's your tab size for coding WP (PHP & HTML) / CSS files?

Just wondering what’s your favourite tab size for HTML/PHP/CSS files?

I used to do it with 4 spaces in the past, but recently I noticed that most of the themes here are using 8 (even the twentyeleven theme). Is there some kind of standard for that?

Back in the days I remember that most of the programmers were using 8 spaces because of the word “function” which is exactly eight-character. However, I find it a bit strange to use 8-space-tab for indenting CSS files for example… How do you do it?

Niki / DodoWeb

I’m using 4 Spaces. I tried 2 Spaces some days ago but I couldn’t adapt to it - looks to stuffy. I stay with 4 Spaces :slight_smile:

I use 4 spaces - Notepad++ default.

4 spaces still looks fine for me, but I really wonder if there’s some kind of standard… for WP theme-ing or in general.

4 space or 1 hard tab more comfortable for me.


but I really wonder if there’s some kind of standard.. for WP theme-ing or in general.


Four spaces is pretty much the standard.

Still bothers me why the WP guys (as well as many authors here) use 8-space tabs… They really don’t look sexy in CSS and HTML files.

4 spaces in php, html but it css i use only 2, dont ask me why ;p

just habit :slight_smile:

I don’t use spaces, I like using tabs with the same size as 4 spaces. If you use tabs and see the source code in the browser it looks like it’s 8 spaces. Maybe that is why you’re seeing so many themes that look like have 8 spaces, when they don’t :slight_smile:

I also use tabs with that size, but I’m referring to the source code, not the generated HTML.

However, I just found that my editor (NetBeans) were expanding tabs to spaces by default… so there we go.