<!DOCTYPE html> <!--Declare the doctype as the html standard of HTML 5-->
<html lang="en-us"> <!--Lang Attribute to declare the language of a webpage-->
<head> <!--Every html doc needs a head which contains important information for viewing the code on different devices.-->
<meta charset="UTF-8"> <!--The declaration of correct character encoding ensures proper interpretation and indexing for search purposes.-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--Another default meta definition sets the user's device display area to a default.-->
<title>Men need multiple mental health options. The content on this site holds no claim to expertise in the mental health profession.</title> <!--Primarily used for SEO, accurate titles help algorithms do their thang.-->
</head>
<body> <!--The body serves as the main content of your page.-->
<h1>Pitfalls</h1> <!--h1 represents a section of the body (a heading); the primary heading, followed by lower-priority additional headings in ascending order.-->
<p>Nearly every man deals with major pitfalls in life <strong>--</strong> <em>depression, sorrow, rage, lonliness, jealousy, resentment </em></p> <!--A p tag represents a style, similar to a paragraph, and visually separates elements.-->
<p>A pitfall is concealed.</p>
<p>A pitfall takes work to maintain.</p>
<p>A pitfall can ruin your life.</p>
<p>You don't have to fall victim these traps. You can learn skills to overcome them, so that when you're faced with decisions that may lead to pitfalls, you can avoid them.</p>
<p>The most important thing to remember is, the choice is yours.</p>
</body>
<footer><a href="/Users/******/Documents/bmi/page2.html">Learn more..</a></footer> <!--Sometimes important links or references are necessarily included in a footer, similar to a research document.-->
</html>我想确保在HTML样式和编码约定以及注释方面,一切都是正确的。缩进是两个(2)空间。我在每一行都做了笔记,以帮助我学习和记忆。
发布于 2021-07-20 04:45:27
HTML不适合人类阅读(但仍然可以阅读),所以这更多的是一种训练,而不是真正的工作。实际产品HTML最好去掉注释和空格,缩小和压缩以节省网络流量。但如果你需要它的可读性。
这里唯一的形式错误可以由在线验证器立即找到:<footer>标记不在<body>。
<strong>不是粗体的这个HTML元素表示其内容具有强烈的重要性、严肃性或紧迫性。它用粗体显示,但如果你需要粗体字体-使用CSS,而不是<strong>标签。
如果需要人工读取代码,请限制字符串宽度。传统的最大宽度接近每行80个符号(80或78),但是使用现代宽屏幕,您可以使其更宽一些;看看您如何在这个站点上看到您的代码。打破长队。
使用相同的缩进
如果评论开始于同样的距离,那就清楚地告诉读者,它们是同一类的。喜欢
<!DOCTYPE html> <!--Declare the doctype as the html standard of HTML 5-->
<html lang="en-us"> <!--Lang Attribute to declare the language of a webpage-->
<head> <!--Every html doc needs a head which contains important
information for viewing the code on different devices.-->
<meta charset="UTF-8"> <!--The declaration of correct character encoding ensures
proper interpretation and indexing for search purposes.-->https://codereview.stackexchange.com/questions/264197
复制相似问题