Я более свеж в HTML и CSS, я пытаюсь внешне связать свой файл CSS с моим HTML файлом, но не могу этого сделать, но Internal CSS работает. Пожалуйста, помогите исправить это
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Colleen</title>
<link rel="stylesheet" type="text/css" href="css/firststyle.css"></link>
<style type="text/css">
@font-face
{
font-family: avengers;
src: url('avengersital.ttf');
}
.heading
{
color: red;
text-align: center;
font-family: avengers;
}
</style>
</head>
<body>
<header>
<h1 class="heading">AVENGERS</h1>
<a href="https://www.w3schools.com">one</a>
<a href="https://www.w3schools.com">two</a>
<a href="https://www.w3schools.com">three</a>
<a href="https://www.w3schools.com">four</a>
</header>
<section>
<h2 id = "hola">Favorite Foods</h2>
<ul class = "list">
<li>Apples</li>
<li>Pizza</li>
<li>Crab</li>
<li>Choclate cake</li>
</ul>
</section>
<section>
<h2 id = "holareturns">Achievements</h2>
<label for="file" id = "filelabel">Progress in this course(100%)</label>
<progress id="file" value="100" max="100"></progress>
<br>
<br>
<label for="filea" id = "filealabel">Progress in the specialization capstone(20%)</label>
<progress id="filea" value="20" max="100"></progress>
<br>
<br>
<label for="fileb" id = "fileblabel">Progress in life goals(67%)</label>
<progress id="fileb" value="67" max="100"></progress>
</section>
<section>
<h2 class="nothing"> More About Me</h2>
<details>
<summary>My Childhood</summary>
<p> I grew up in Ashtabula Ohio. I lived near Lake Erie and I really miss the sunsets over water
</p>
</details>
</section>
<footer>
<img src= "http://www.intro-webdesign.com/images/newlogo.png" alt = "wd4e Logo">
<caption>This page was created by Vaibhav Sharma & Colleen van Lent, To learn more about web design, visit <a href="http://www.intro-webdesign.com">Intro To Web Design</a></caption>
</footer>
</body>
</html>
и мой CSS равен
@font-face{
font-family: avengers !important;
src: url('avengersital.ttf') !important;
}
heading{
color: red !important;
text-align: center !important;
font-family: avengers !important;
}
Я пробовал использовать! Важный во всех строках CSS и пытался использовать без него, у меня есть использовал полное местоположение папки в href в HTML, но все еще не работает.
Отредактировано: поэтому мой код работал так, как я использовал '\' в месте, где мне пришлось использовать '/' для подключения мой CSS с моим HTML. Я посещаю изменения
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Colleen</title>
<link rel="stylesheet" type="text/css" href="A:/css/style.css"></link>
</head>
<body>
<header>
<h1 class="heading">AVENGERS</h1>
<a href="https://www.w3schools.com">one</a>
<a href="https://www.w3schools.com">two</a>
<a href="https://www.w3schools.com">three</a>
<a href="https://www.w3schools.com">four</a>
</header>
<section>
<h2 id = "hola">Favorite Foods</h2>
<ul class = "list">
<li>Apples</li>
<li>Pizza</li>
<li>Crab</li>
<li>Choclate cake</li>
</ul>
</section>
<section>
<h2 id = "holareturns">Achievements</h2>
<label for="file" id = "filelabel">Progress in this course(100%)</label>
<progress id="file" value="100" max="100"></progress>
<br>
<br>
<label for="filea" id = "filealabel">Progress in the specialization capstone(20%)</label>
<progress id="filea" value="20" max="100"></progress>
<br>
<br>
<label for="fileb" id = "fileblabel">Progress in life goals(67%)</label>
<progress id="fileb" value="67" max="100"></progress>
</section>
<section>
<h2 class="nothing"> More About Me</h2>
<details>
<summary>My Childhood</summary>
<p> I grew up in Ashtabula Ohio. I lived near Lake Erie and I really miss the sunsets over water
</p>
</details>
</section>
<footer>
<img src= "http://www.intro-webdesign.com/images/newlogo.png" alt = "wd4e Logo">
<caption>This page was created by Vaibhav Sharma & Colleen van Lent, To learn more about web design, visit <a href="http://www.intro-webdesign.com">Intro To Web Design</a></caption>
</footer>
</body>
</html>
Спасибо за ваши ответы всем !! Мир!