简体   繁体   English

Visual Studio Code 无法识别 HTML 文件

[英]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.我正在学习在 Python Django 上构建网站,但是当我在 VS 代码中创建 HTML 文件时,此编辑器无法识别此文件。 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知道的请帮帮我,非常感谢在此处输入图片说明

  • Try to install any HTML extension尝试安装任何 HTML 扩展
  • Turn on HTML5 suggestion in settings.json file:在 settings.json 文件中打开 HTML5 建议:

    "html.suggest.html5": true “html.suggest.html5”:真

Follow this post关注这个帖子

No HTML suggestions in Visual Studio Code Visual Studio Code 中没有 HTML 建议

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.请注意,在屏幕右下角,文档语言是 Python Django,但如果单击它并将语言更改为 HTML,您将获得 HTML 语言功能。

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.如有必要,有时在具有所需语言类型的并排窗口中撰写文档、获取提示和自动完成功能,然后将其复制到相邻文档中会很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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