我的练习网页完全是空的,我不知道为什么一切练习</</desc> <question vote="-1"> <pre><code><!DOCTYPE html> <head> <meta charset="utf-8"> <meta name="description" content="This is a practice website"> <title>Everything Practice</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="Resources/css/index.css" rel="stylesheet" type="text/css"> </head> <html> <body> <!--Title and Banner--> <header> <title> <h1>Flip 'n' Sell</h1> <title> <nav> <ul> <li>Home</li> <li>Info</li> <li>Help</li> <li>Selling</li> </ul> </nav> </header> </body> </html> </code></pre> <p>这是到目前为止我的页面的 HTML 和 CSS。正如您所看到的,我所做的只是将其样式设置为不存在默认边距和填充。</p> <p>当我加载这个并查看网页时,什么都没有,什么都没有。我做错了什么?</p> <pre><code>* { margin: none; padding: none; box-sizing: border-box; } </code></pre> </question> <answer tick="true" vote="1"> <p>将开始的 <pre><code><html></code></pre> 标签移至 Doctype 声明下的 <pre><code><head></code></pre> 标签之前,并从正文中更改或删除 <pre><code><title></code></pre> 标签。</p> <p>标题标签定义整个文档的标题(浏览器选项卡上显示的内容),在渲染页面时可能会造成一些混乱。<a href="https://www.w3schools.com/tags/tag_title.asp" rel="nofollow noreferrer">请参阅 W3 School 关于标题标签的帖子</a></p> </answer> <answer tick="false" vote="1"> <pre><code><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="description" content="This is a practice website"> <title>Everything Practice</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="Resources/css/index.css" rel="stylesheet" type="text/css"> </head> <body> <!--Title and Banner--> <header> <h1>Flip 'n' Sell</h1> <nav> <ul> <li>Home</li> <li>Info</li> <li>Help</li> <li>Selling</li> </ul> </nav> </header> </body> </html> </code></pre> <p>修复了您的标题标签未终止的问题。需要相应的 <pre><code></title></code></pre> 但实际上标题标签不属于那里,应该像我在示例中那样删除。</p> </answer> </body></html>

问题描述 投票:0回答:0
html css
© www.soinside.com 2019 - 2024. All rights reserved.