我的css文件更改仅适用于index.html,而不适用于其他html文件
我在atom代码编辑器中键入了以下代码。我有一个名为HTML个人网站的文件夹,里面有我的index.HTML文件以及其他名为cabiods.HTML和联系人信息.HTML的链接HTML文件。在HTML个人网站文件夹中,我还有一个名为style.css的css文件,我已将其链接到主HTML文件(index.HTML)。问题是,我对css文件所做的更改只适用于我的index.html文件,而不适用于其他html文件(链接到index.html) 这就是我如何将index.html链接到styles.css(我的css文件):(请忽略代码中的大表)我的css文件更改仅适用于index.html,而不适用于其他html文件,html,css,atom-editor,Html,Css,Atom Editor,我在atom代码编辑器中键入了以下代码。我有一个名为HTML个人网站的文件夹,里面有我的index.HTML文件以及其他名为cabiods.HTML和联系人信息.HTML的链接HTML文件。在HTML个人网站文件夹中,我还有一个名为style.css的css文件,我已将其链接到主HTML文件(index.HTML)。问题是,我对css文件所做的更改只适用于我的index.html文件,而不适用于其他html文件(链接到index.html) 这就是我如何将index.html链接到styles.
Soham的个人网站
苏哈姆登格拉酒店
一个正在学习编码和制作自己的的男孩
我喜欢阅读您的Contact.html文件,但不包括样式表文件。您需要添加到所有应该使用该样式表的文件中。您必须将
添加到每个文件中将此代码从索引页面添加到其他页面。
打在头上。
范例
业余爱好
阅读
虚构的
科幻小说
幻想
神秘的
科幻小说
神秘的
冒险
添加:
对于所有三个html文件,您必须使用reference
将其转换为其他两个html文件。如果您仅使用原始html,则无法链接多个html文件,因此您必须询问她如何操作。我误解了。老师也按照你说的方式进行了。我听错了。再次抱歉,非常感谢。
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title> Soham's Personal Site</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<table cellspacing="20">
<tr>
<td><img src="Attack-on-titan-circle.png" alt="Attack on Titan"></td>
<td>
<h1>Soham dengra</h1>
<p><em>A boy learning to code and make his <strong><a href="https://www.google.com/">1st website</a></strong>.</em></p>
<p>I like reading Your Contact.html file don't include the stylesheet file. You need to add to all the files which should use that stylesheet.You have to add <link rel="stylesheet" href="css/styles.css">
to every filesAdd this code from the index page to other pages.
into the head.
example
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="css/styles.css">
<meta charset="utf-8">
<title></title>
</head>
<body>
<h3>Hobbies</h3>
<ol>
<li>Reading</li>
<ol type="i">
<li>Fiction </li>
<li>Sci-fi</li>
<li>Fantasy</li>
<li>Mystery</li>
</ol>
<li><a href="https://www.imdb.com/">Movies</a></li>
<ol>
<li>Sci-fi</li>
<li>Mystery</li>
<li>Adventure</li>
</ol>
</ol>
</body>
</html>
<link rel="stylesheet" href="css/styles.css">