[英]HTML/CSS style tags not working
For some reason, none of my style tags are being picked up either in the embedded CSS or HTML. 由于某种原因,嵌入式CSS或HTML都没有拾取我的样式标签。 Neither the font-family changes are not being taken into effect nor the
border-top: 5px solid black;
字体系列更改既未生效,也未
border-top: 5px solid black;
line. 线。 Any tips?
有小费吗?
<!DOCTYPE html>
<html>
<head>
<title>
My Resume
</title>
<style type=“text/css”>
#ob {
border-top: 5px solid black;
}
</style>
</head>
<body>
<div>
<h1 style=“font-family: sans-serif”>
<strong>Corey Schnedl </strong>
</h1>
<h4 style=“font-family: Sans-Serif”>
<strong> XXXXXXXXXXX / XXXXXXXX / XXXXX / XXXXX </strong>
<br>
<strong>XXXXXXXXXXXXX</strong>
</h4>
</div>
<div>
<h3 style=“font-family:Arial”>
<strong>Objective</strong>
</h3>
<p>
To obtain an entry-level position as a Java software developer.
</div>
</body>
</html>
Use plain text quotes. 使用纯文本引号。 This
"
not “
这个
"
不“
Four occurrences that break your code: 破坏代码的四种情况:
<style type=“text/css”>
<h1 style=“font-family: sans-serif”>
<h4 style=“font-family: Sans-Serif”>
<h3 style=“font-family:Arial”>
<!DOCTYPE html> <html> <head> <title> My Resume </title> <style type="text/css" rel="stylesheet"> #ob { border-top: 5px solid black; } </style> </head> <body> <div> <h1 style="font-family: sans-serif"> <strong>Corey Schnedl </strong> </h1> <h4 style="font-family: Sans-Serif"> <strong> XXXXXXXXXXX / XXXXXXXX / XXXXX / XXXXX </strong> <br> <strong>XXXXXXXXXXXXX</strong> </h4> </div> <div> <h3 style="font-family:Arial"> <strong>Objective</strong> </h3> <p> To obtain an entry-level position as a Java software developer. </div> </body> </html>
Edit this: 编辑此:
<style type="text/css" rel="stylesheet">
and this 和这个
style="font-family:'Arial';"
put a semicolon at the end of every style
attribute 在每个
style
属性的末尾放置一个分号
Here is your edited page 这是您编辑的页面
<!DOCTYPE html>
<html>
<head>
<title>
My Resume
</title>
<style type="text/css" rel="stylesheet">
#ob {
border-top: 5px solid black;
}
</style>
</head>
<body>
<div>
<h1 style="font-family: sans-serif;">
<strong>Corey Schnedl </strong>
</h1>
<h4 style="font-family: Sans-Serif;">
<strong> XXXXXXXXXXX / XXXXXXXX / XXXXX / XXXXX </strong>
<br>
<strong>XXXXXXXXXXXXX</strong>
</h4>
</div>
<div>
<h3 style="font-family:Arial;">
<strong>Objective</strong>
</h3>
<p>
To obtain an entry-level position as a Java software developer.
</div>
</body>
</html>
Using a validator is a good idea to check your syntex mistakes. 使用验证器是检查语法错误的好方法。 Here https://validator.w3.org/#validate_by_input
在这里https://validator.w3.org/#validate_by_input
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.