简体   繁体   中英

VS Code stopped formatting existing HTML file created before. New HTML file can be formatted

The problem is VS code stopped formatting existing, working HTML file when I press hotkey. However if I create a new HTML file I can format file easily. I have a problem with HTML files that I worked before, I was able to format files easily, then after pushing to GitHub HTML file stopped formatting, I am not sure that there is a link between them. I tried to format HTML file by creating paragraph, screen is below. Screen from VS code

I tried several things to solve the problem 1 Restarted VS code 2 Tried to format by using command pallete then chose format document with, then chose Prettier 3 Pressed Prettier in the bottom part of the VS code to see problems - no problems 4 If I create a new HTML file I can format HTML FILE, but existing ones I can't format

Please help if you know how to fix this problem, I am new to programming, tried to google. watch videos but couldn't find the answer. If possible please write steps how to fix the issue.

The problem is fixed. I made a mistake in tags, so be very very careful and check your tags on html file that you are working on. The problem was that I did incorrect order of the and tags. That's why VS code wasn't able to format the HTML file. So guys if you have same problem just, recheck the tags! It might help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM