【html的换行规则】
本帖最后由 书香 于 2023-5-21 02:34 编辑html代码和其他语言有一个最大的不同,html代码的换行无意义
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
第1行
第2行
</body>
</html>
很多人可能发现了,我写这个第1行,第2行前后没有组件(标签),这表示无效果,我们运行看看结果
https://shuxiangyage.net/forum.php?mod=image&aid=406&size=300x300&key=15e22583bad99931&nocache=yes&type=fixnone
我们如何需要换行可以写一个<br>
https://shuxiangyage.net/forum.php?mod=image&aid=407&size=300x300&key=2e449e681b99b365&nocache=yes&type=fixnone
重点:<br>是一个独立标签(组件),无需写成<br></br>
(点击返回课程目录:https://www.52hb.com/thread-58658-1-1.html)
谢谢分享
页:
[1]