Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Inline HTML IndentNew to Visual Studio Code? Get it now.
Inline HTML Indent

Inline HTML Indent

vulkd

|
6,382 installs
| (1) | Free
Indents inline HTML
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

inline-html-indent

https://marketplace.visualstudio.com/items?itemName=vulkd.inline-html-indent

About & Usage

  • Created quickly to fill a need of indenting inline html in javascript template strings.
  • Select any HTML / XML. Open and choose HTML Inline Indent from the command palette.
  • Uses VSCode's inbuilt indent logic for HTML

Example Before and After:

const z = `

<div>
<p>asd
</p>
    </div>

    <style scoped>
    .asd {
        background: red;
        color: [#123456](https://github.com/vulkd/vscode-inline-html-indent/issues/123456);
    }
    </style>
    
    <script type='text/javascript'>const a = 1;
    
    const b = () => { return new Promise((resolve, 
        reject) => {
            3 < 4 ? resolve() : reject()
        })}
        
        </script>

        <div>

            <div>

                <div>
                </div>
            </div>
        </div>
`
const z = `

<div>
    <p>asd
    </p>
</div>

<style scoped>
    .asd {
        background: red;
        color: [#123456](https://github.com/vulkd/vscode-inline-html-indent/issues/123456);
    }
</style>

<script type='text/javascript'>const a = 1;
    
    const b = () => { return new Promise((resolve, 
        reject) => {
            3 < 4 ? resolve() : reject()
        })}
        
    </script>
    
    <div>
        
        <div>
            
            <div>
            </div>
        </div>
    </div>
`
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft