All code has custom tab size

Added by Rory O’Kane@userstyles, Created: Jun 20, 2013, Updated: Mar 18, 2015
  • With the style applied
  • Without the style applied (Generated screenshot)
  • With the style applied (Generated screenshot)
Desired tab size


On all websites, change the width of tab characters in code from the default 8 spaces wide to 4 spaces wide, or whatever other size you choose in the selector below. The setting affects all HTML elements.

This is like my other style, but it applies to all websites. However, it only works on properly marked-up code – this may not work on some sites that present their code in an unusual way.

More info
Here is the text in the screenshot. After installing this style, you can paste this text into the left box on to see the style in action:
(This is a site where you can write text and code on the left and see it rendered on the right.)

    	Tab-indented text in a code block

See – in the rendered HTML, the tab is four spaces wide, instead of the default eight. That text has a tab character before it, not four spaces.

You should to add comment and rate the style.


+ Create discussion

Applies to:
all URLs

Related styles:

WARNING: This webware is not functioning properly. Please enable javascript in your browser and try again.