📜  HTML<hr>标签

📅  最后修改于: 2021-11-03 10:41:41             🧑  作者: Mango

HTML 中的


标签代表水平线,用于在 HTML 页面中插入水平线或主题分隔符以划分或分隔文档部分。
标签是一个空标签,它不需要结束标签。
标签属性:下表描述了
标签属性:

Attribute Value Description
Align left center right Used to specify the alignment of the horizontal rule.
noshade noshade Used to specify the bar without shading effect.
size pixels Used to specify the height of the horizontal rule.
width pixels Used to specify the width of the horizontal rule.

句法 :


...

下面的程序说明了 HTML 中的


标签:
示例 1:

HTML

  

  
    
          

There is a horizontal rule below this paragraph.

                    
          

This is a horizontal rule above this paragraph.

                 


HTML

  

  
    
        
          

Normal horizontal line.

                             
                      

Horizontal line with height of 30 pixels

           
                      

Horizontal line with height of 30 pixels                                        and noshade.

           
                  


输出:

示例 2(带有属性的 hr 标记):

HTML


  

  
    
        
          

Normal horizontal line.

                             
                      

Horizontal line with height of 30 pixels

           
                      

Horizontal line with height of 30 pixels                                        and noshade.

           
                                       

输出:

支持的浏览器:

  • 谷歌浏览器
  • IE浏览器
  • 火狐
  • 歌剧
  • 苹果浏览器

HTML 是网页的基础,用于通过构建网站和 Web 应用程序进行网页开发。您可以按照此 HTML 教程和 HTML 示例从头开始学习 HTML。

CSS 是网页的基础,用于通过样式化网站和 Web 应用程序进行网页开发。您可以按照此 CSS 教程和 CSS 示例从头开始学习 CSS。