[英]"Start tag body seen but an element of the same type was already open" & can't figure out how to center horizontally?
I'm really new at this so I'm sure this is a simple mistake- could someone help me figure out what I'm doing wrong?我真的很新,所以我确定这是一个简单的错误 - 有人可以帮我弄清楚我做错了什么吗? I can't seem to center my content, and my code is invalid.
我似乎无法将我的内容居中,而且我的代码无效。 I'm thinking it's a nesting error, but I'm not sure.
我认为这是一个嵌套错误,但我不确定。
(There's also an error stating that my "align" attribute is obsolete, which my teacher is telling me to ignore for the time being) (还有一个错误指出我的“align”属性已过时,我的老师告诉我暂时忽略)
<!DOCTYPE html> <html lang="en"> <link rel="stylesheet" type="text/css" href="javajam.css"> <title>JavaJam Coffee House</title> <header> <h1><img src="javalogo.gif" alt="JavaJam Coffee House" width="700" height="100"></h1> </header> <body> <div class="wrapper"> <nav> <a href="index.html">Home</a> <a href="menu.html">Menu</a> <a href="music.html">Music</a> <a href="jobs.html">Jobs</a> </nav> <main> <img src="windingroad.jpg" alt="Winding Road" height="154" width="333" align="right"> <ul> <li>Specialty Coffee and Tea</li> <li>Bagels. Muffins and Organic Snacks</li> <li>Music and Poetry Readings</li> <li>Open Mic Night</li> </ul> </main> <div> 12312 Main Street <br>Mountain Home, CA 93923 <br>1-888-555-5555 </div> <footer> Copyright © 2014 JavaJam Coffee House <br>ari.levy@gmail.com </footer> </div> </body> </html>
Your <header>
tag is on a wrong place and you miss the <head>
tag你的
<header>
标签放错了地方,你错过了<head>
标签
Example:例子:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="javajam.css">
<title>JavaJam Coffee House</title>
</head>
<body>
.....
<!-- Place your <header> tag between the <body> tag -->
.....
</body>
</html>`
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.