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)
<!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
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>`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.