HTML不会链接到Visual Studio代码中的CSS文件 [英] HTML wont link to CSS file in Visual Studio Code

查看:700
本文介绍了HTML不会链接到Visual Studio代码中的CSS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的css格式链接到一个HTML文档。

I am trying to link my css formatting to an HTML document.

正如你所看到的,我的CSS是链接是

As you can see, my CSS is link is

<link rel="stylesheet" href="css/style.css" />

我的CSS文件名为style.css,名为css。
为什么没有链接?

And my CSS file is titled style.css in a folder called css. Why is it not linking?

推荐答案

我会添加属性类型和值text / css
您的链接标签最终会如下所示:

I would add the attribute type and value "text/css" Your link tag would end up like this:

<link rel="stylesheet" href="css/style.css" type="text/css"

这篇关于HTML不会链接到Visual Studio代码中的CSS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆