我正在简化网站的重新设计,并在我的HTML中遇到错误。我找不到解决方案,并使用html检查器检查它,响应为“没有根元素的致命错误”这是什么意思,我该如何解决? https://jsfiddle.net/ytsc7t7d/1/
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>the honours</title>
<link rel="stylesheet" href="style.css">
<div class="wrapper">
<body>
<div class="res" style="display:none">
<div class="reservations-surround">
<h1>INFORMATION</h1><br
<p>The reservation form opposite allows you to book directly via our Restaurant Diary for tables of up to five people. For bookings of
6 or more, please use our <a href="contact.html">Contact Form</a> or call us on 0131 220 2513.</p>
<p>To make a reservation please complete the details opposite and click check availability. (please enter time requested).</p>
<p>If your preferred time or date is not available please call 0131 220 2513.</p>
</div>
<div class="reservations-link close"></div>
</div>
<div id="container">
<header>
<a href="honours_festive.html"><img src="images/the_honours.jpg" alt="logo"></a>
<div class="navlist">
<nav>
<ul>
<li class="home-link"><a href="index.html">Home</a></li>
<li class="menus-link"><a href="menus.html">Menus</a></li>
<li class="reservations-link"> <a href="reservations.html">reservations</a>
<li class="team-link"><a href="team.html">Team</a></li>
<li class="gallery-link"><a href="gallery.html">Gallery</a> </li>
<li class="recruitment-link"><a href="recruitment.html">Recruitment</a></li>
<li class="contact-link"><a href="contact.html">Contact</a> </li>
</ul>
</nav>
</div>
</header>
<img src="images/food.jpg" alt="gallery">
<div class="heading">
<h1>Welcome</h1>
</div>
<div class="four-columns">
<p>
Having launched the Michelin-starred <a href="http://www.martin-wishart.co.uk/">Restaurant Martin Wishart</a> in 1999, and <a href="http://www.martin-wishart.co.uk/martin-wishart-loch-lomond/">Martin Wishart at Loch Lomond</a> in Cameron House Hotel in 2008, Martin opened The Honours to great acclaim in 2011, with a sister restaurant following in Glasgow in 2014.</p>
<p> Martin aims to further strengthen Scotland's reputation for good food and to inspire others with his unequivocal enthusiasm for the very best traditional and modern French cuisine.<br />
<i>The Honours - Edinburgh</i> represents the exciting next step of his journey.
</p>
</div>
<div class="four-col">
<p>The restaurant's name makes reference to the moment in Scottish history when Sir Walter
Scott who lived nearby, uncovered the Scottish Crown Jewels, also known as The Honours of Scotland.
</p> <p>In addition, the name owes a debt to a rare 18th century book, "the Honours of the Table". In this celebrated volume, the author, Rev. Dr. John Trusler, advised the youth of the day on table etiquette, exclaiming that"To do the honours of a table gracefully, is one of the outlines of a well-bred man..."
</div>
<div id="section-two">
<!-- Menu -->
<div class="six-col">
<div class="heading">
<h1>Menus</h1>
</div>
<div class="four-col">
<p>
Developed by Head Chef Paul Tamburrini and Martin Wishart himself, <i>The Honours - Edinburgh</i> menu combines seasonal, Scottish flavours
in brasserie-influenced dishes.<br />
<a href="menus.html">—Find out more </a>
</p>
</div>
<div class="flex_img">
<img src="images/left_image.jpg" width="460" height="300" />
<img src="images/right_image.jpg" width="460" height="300" />
</div>
</div>
<!-- Team -->
<div class="six-col">
<div class="heading">
<h1>Team</h1>
</div>
<p>
Headed up by Paul Tamburrini, Restaurant Manager Steven Spear and Martin Wishart <i>The Honours - Edinburgh</i> is destined to become one of the country's most talked-about restaurants.<br />
<a href="team.html">—Find out more </a>
</p>
</div>
</div>
<footer>
<div>
<h2>Gift Vouchers</h2>
<p>For <i>The Honours - Edinburgh</i>, or any of Martin's other great restaurants - Restaurant Martin Wishart and Restaurant at Loch Lomond.<br />
<a href="gift-vouchers.html">—Purchase here</a></p>
</div>
<div>
<h2>Opening Hours</h2>
<p>Tuesday - Saturday<br />
<i>Lunch</i> 12:00—14:30<br />
<i>Dinner</i> 18:00—22:00<br />
<i>Closed Sunday all day</i><br />
<i>Closed Monday all day</i><br />
</div>
<div>
<h2>Contact Details</h2>
<p><i>The Honours - Edinburgh</i><br />
58a North Castle Street <br />
Edinburgh EH2 3LU <br />
Telephone 0131 220 2513 <br />
<i><a href="mailto:info@thehonours.co.uk">info@thehonours.co.uk</a></i> <br />
<span><a href="contact.html">—Find out more </a></span></p>
</div>
<div class="news_column">
<h2>Newsletter</h2>
<p>For all the latest news, updates
and events at <i>The Honours - Edinburgh</i>,
simply enter your details and
you will receive our exclusive
newsletter direct to you inbox<br />
<a class="newsletter" href="sign-up.html">—Sign up</a></p>
</div>
<img src="images/footer.jpg" alt="footer">
</footer>
答案 0 :(得分:1)
您应该遵循正确的html结构,这意味着添加<head></head>
和<body></body>
元素:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>the honours</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="wrapper"><!--your content--></div>
</body>
</html>