1

Can anyone tell me how I can format HTML inside of a .php file? If I could also format php code at the same time it would help a lot.

By format I mean automatically add the correct tab spacing between lines and elements.

All I can find is PHP extensions, extensions to format PHP or extensions to format HTML code in Visual Studio Code.

2
  • Code formatting is called linting. Commented Sep 30, 2017 at 17:03
  • It's a long shot, but see the answer here stackoverflow.com/questions/41330707/… about using the beautify extension. Commented Oct 3, 2017 at 7:21

1 Answer 1

0

According to its documentation, this VS Code Marketplace extension supports HTML and CSS linting within .php files.

Sign up to request clarification or add additional context in comments.

1 Comment

This doesn't add the 4 spaces when I enter a new line, and it doesn't format my document in any way. I wouldn't call this formatting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.