[英]Cant link my HTML and CSS
I cant make my HTML and CSS code link. 我无法建立我的HTML和CSS代码链接。 (Yes, i have looked it up, but it still wont work)
(是的,我已经查过,但是仍然无法正常工作)
My HTML code 我的HTML代码
(Name: test1.html , complete path: /tacocraft.net/tacocraft.net/testing-and-stuff/test1.html/ ) (名称: test1.html ,完整路径: /tacocraft.net/tacocraft.net/testing-and-stuff/test1.html/ )
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type= "text/css" href="test1css.css" />
<body>
<h3>Please input username and password</h3>
<div>
<form action="/action_page.php">
<label for="fname">Username</label>
<input type="text" id="fname" name="firstname" placeholder="Username(Admin)">
<label for="lname">Password</label>
<input type="text" id="lname" name="lastname" placeholder="Password(Admin)">
<input type="submit" value="Submit">
</form>
</div>
</body>
</html>
And my CSS (Name test1css.css , path: /tacocraft.net/tacocraft.net/testing-and-stuff/test1css.css/ ) 和我的CSS(名称test1css.css ,路径: /tacocraft.net/tacocraft.net/testing-and-stuff/test1css.css/ )
input[type=text], select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type=submit] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
You are missing the closing </head>
tag. 您缺少
</head>
标记。 Without the </head>
it will not properly link, as it views the rest of it to be nested in the head. 如果没有
</head>
,它将无法正确链接,因为它会查看其余部分嵌套在head中。 The CSS never takes effect. CSS永远不会生效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.