Set the width of a tab character with CSS


Use the tab-size property in CSS to set the width of a tab character. You can try to run the following code to implement the tab-size property

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         #demo {
            tab-size: 12;
         }
      </style>
   </head>
   <body>
      <h1>The tab-size Property</h1>
      <pre id = "demo">
         This is demo text.
      </pre>
   </body>
</html>

Updated on: 25-Jun-2020

96 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements