'Visual Studio Code don't recognize HTML file

I am learning to build a Website on Python Django, but when I create a HTML file in VS code, this Editor don't recognize this file. You can see in following picture. I don't know how to solve this problem. Pls help me if you know, thank you very much enter image description here



Solution 1:[1]

  • Try to install any HTML extension
  • Turn on HTML5 suggestion in settings.json file:

    "html.suggest.html5": true

Follow this post

No HTML suggestions in Visual Studio Code

Solution 2:[2]

Note that in the bottom right-hand corner of your screen, the document language is Python Django, but if you click that and change the language to HTML, you will get HTML language features.

if necessary, sometimes it can be useful to compose a document in a side-by-side window that has the language type you need, to get the hinting and auto completion features, and then copy that into the adjoining document.

Solution 3:[3]

After installing and activating Django extension; File - Preferences - Settings Then find "Emmet:Include Languages" (You can use CTRL + F for that)

After that arrange "Item" and "Value":
Item = django-html
Value = html

Then click OK

In this way, it will be solved I guess

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gokul Thiagarajan
Solution 2 ultraGentle
Solution 3 Sina Bedir