<pr> 不是合法 HTML 标签,浏览器会忽略或错误解析它,导致段落粘连;正确做法是使用语义化的 <p> 标签包裹每段文字,并确保标签拼写准确、嵌套合规。
html 中误用 ` ` 标签包裹每段文字,并确保标签拼写准确、嵌套合规。 在您提供的代码中,问题根源非常明确:<pr> 是一个不存在的 HTML 元素(既非标准标签,也非自定义元素)。HTML 规范中没有 <pr> 标签,因此浏览器会将其视为未知标记而跳过解析——更严重的是,当遇到未闭合或非法起始标签(如 <pr>)时,解析器可能进入“纠错模式”,将后续内容错误地嵌套进前一个 <p> 中,最终表现为段落“粘连”、样式失效、甚至 DOM 结构混乱。 ✅ 正确做法是:所有段落内容必须使用标准的 <p> 标签包裹,并严格配对闭合: ⚠️ 注意事项: 将调研报告、方案对比、数据分析、需求梳理、会议纪要、设计说明、代码评审、学习笔记等任务产物输出为可在浏览器直接打开的单文件 HTML,替代 Markdown 作为最终交付物。Markdown 在信息密度、视觉清晰度和可分享性上已跟不上 AI 产物的丰富度,HTML 能同时承载排版、表格、SVG 等。 总结:HTML 是一门语义化标记语言,每个标签都有其明确用途和规范约束。放弃臆造标签(如 <pr>),坚持使用标准元素(<p>、<ul>、<section> 等),不仅能解决布局异常,更是构建健壮、可维护、无障碍网页的基础。 立即学习“前端免费学习笔记(深入)”;<p><strong>Weekly quizzes:</strong> are short online quizzes completed at the beginning of your tutorial. See the Schedule above for the topics and dates of these quizzes. In general they cover the material from the previous lectures and are closed book.</p>
<p><strong>Lab Exercises:</strong> In the tutorial your tutor will review the completion of your lab exercises. You are encouraged to attempt to complete the set exercises before your tutorial so you have time to discuss any issues that arise with your tutor and get them marked off.</p>
<p><strong>Assignments: Parts 1, 2 and 3:</strong> are incremental installments of a web site development task. In Part 1 you will demonstrate your ability to develop and deploy on a server well-structured, linked web pages with text, graphics, tables and forms, styled with CSS. Part 2 extends the use of HTML elements and introduces JavaScript for form validation and dynamic behavior. Part 3 uses forms to submit and retrieve data from a server via PHP and MySQL.</p>


















