• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com专业计算机教程网站
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure
您的位置:首页 > 网页设计 >html/xhtml > html中br和br/的区别介绍

html中br和br/的区别介绍

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-08-05

本文主要包含html,br,br/等相关知识,佚名 希望在学习及工作中可以帮助到您
answer from stackflow:

Simply <br> is sufficient.

The other forms are there for compatibility with XHTML; to make it possible to write the same code as XHTML, and have it also work as HTML. Some systems that generate HTML may be based on XML generators, and thus not have the ability to output just a bare <br> tag; if you're using such a system, it's fine to use <br/>, it's just not necessary if you don't need to do it.

Very few people actually use XHTML, however. You need to serve your content as application/xhtml+xml for it to be interpreted as XHTML, and that will not work in IE (it will also mean that any small error you make will prevent your page from being displayed, in browsers that do support XHTML). So, most of what looks like XHTML on the web is actually being served, and interpreted, as HTML. See Serving XHTML as text/html Considered Harmful for some more information.

意思就是说:HTML中的规定是<br>空标签,没有结束符,但是在XHTML中,规定是<br/>开始标签后面紧跟结束标签。

在 XHTML 中,<br> 标签必须被正确地关闭,比如这样:<br />。<br> 标签是空标签(意味着它没有结束标签,因此这是错误的:<br></br>)。在 XHTML 中,把结束标签放在开始标签中,也就是 <br />。

您可能想查找下面的文章:

  • HTML表单提交的几种方式_动力节点Java学院整理
  • HTML表单_动力节点Java学院整理
  • HTML大于号、小于号、空格、引号等常用的转义代码写法一览表
  • HTML中实现鼠标经停时整行(tr)变色
  • html格式化json的实例代码
  • html在消息按钮上增加数量角标的实现代码
  • html页面跳转传递参数问题
  • html、css和js注释规范用法小结
  • Html 实现动态显示颜色块的报表效果(实例代码)
  • html是什么文件 html文件如何打开

相关文章

  • 2017-08-05XHTML标签的嵌套规则分析
  • 2017-08-05html 网页跳转代码
  • 2017-08-05一些编写高性能HTML应用的建议
  • 2017-08-05Readonly和Disabled之间的微小区别详解
  • 2017-08-05html css 控制div或者table等固定在指定位置的实现方法
  • 2017-08-05Zen HTML Elements 使用zen coding的朋友可以收藏下
  • 2017-08-05用图片作为label,for属性IE下不起作用
  • 2017-08-05meta标签详解(meta标签的作用)
  • 2017-08-05定义span的最小高度没有效果的解决方法
  • 2017-08-21HTML和XML的区别·

文章分类

  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure

最近更新的内容

    • html插入图片示例(html添加图片)
    • 关于html水平垂直居中的问题小结
    • canvas.toDataURL image/png 报错处理方法推荐
    • osb错误代码
    • html格式化json的实例代码
    • dom操作表格示例(dom创建表格)
    • 文字滚动后自动停止效果示例
    • html页面嵌套使用示例(frameset使用方法)
    • 设置contenteditable属性可编辑HTML标签的内容(可代替textarea)
    • HTML表格与框架

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有