MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
  • Home
  • About
  • Contact
  • Privacy
  • Sitemap
  • BLOG
  • AFFILIATE MARKETING
    • LeadsArk
  • MORE
    • MAKE MONEY
      • ONLINE BUSINESS
      • ADSENSE
      • AFFILIATE MARKETING
    • BLOGGING
      • SEO
      • BlogSpot
      • WORPRESS
      • GOOGLE
      • COMPUTER TIPS
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DEVELOPMENT
      • PHP
      • WORDPRESS
  • DOWNLOADS
    • Blogger Template
    • Wordpress Theme
    • PDF

Thursday, December 13, 2018

How to use HTML hr and br Tag?

 MyBlogHelp     December 13, 2018     html     2 comments   


html-hr-br-tags
HTML-HR-BR-TAGS

HTML <hr> Tag

      The HTML <hr> tag is used to separate the content according to the subject. This tag generates a horizontal line that can be used to separate different topics. It is also called horizontal rule in HTML. In HTML5, the <hr> tag defines the thematic break and in old versions, it was used to create a horizontal rule.
For example, if you are writing an article in which you are giving your thoughts on different subjects, you can separate those topics by <hr> tag. The <hr> tag should not be confused with the <section> tag. <hr> tag separates different topics of an article whereas <section> tag is used to define different sections in a web page.

How to use HTML <hr> and <br> Tag?

Syntax of HTML <hr> Tag

          The general syntax for <hr> tag is given below.

                                   <hr>

As you can see in the syntax, there is no end tag of <hr> tag. This is an empty tag. But if you are using it in XHTML, then you have to close it..

                                 <hr/>

In XHTML, you put forward slash in the opening tag, which shows both the opening and the end tags.

Attributes of HTML <hr> Tag

There are four attributes of the <hr> tag but these attributes don’t support in HTML5 because these are disabled in HTML5.

align

          With this attribute, you can set the alignment of <hr> tag. This attribute can have left, center and right three possible values.

noshade 

         By this tag, you can define that <hr> tag should be shown in only one color and no shade should be used. The value of this attribute defines you noshade itself.  

size

          By this attribute, you can define the height of the <hr> tag. You can define its value in pixels.

width

          With this attribute, you define the width of the <hr> tag. Its value also defines you in pixels. <hr> tag supports all global and event attributes in all HTML versions.

Example of HTML <hr> Tag



The above example produces output as below.
    
html-hr-tag
HTML-HR-TAG

HTML <br> Tag


The tag in HTML is used to break the line in a text or paragraph. This tag is important for situations in which the line break is important. For example, when writing a poem or address, you can use this tag to break the text line.

HTML <br> tag should not be used to increase the gap between lines or paragraphs. For this, you can either use different <p> (paragraph) tag or CSS margin property.

An advanced version of this tag is introduced in HTML5 which is known as <wbr> tag. The text line is broken by <br> tag, by the same <wbr> tag you can suggest to the browser that the text line has to break if the screen size is low.

Syntax of HTML <br> Tag

The general syntax for defining the tag in HTML is being given below.

                                             text <br> text

As you can see in the syntax, the tag is defined in the middle of the text, it is an inline tag. There is no end tag of <br> tag in HTML. This is an empty tag.

In XHTML, the <br> tag is defined differently. Its syntax is given below.

                                          text <br/> text

As you can see in the syntax above, the <br> tag in XHTML is defined as a self-closing tag. The main reason for this is that XML does not allow any tag to be open. Therefore, whenever you use a tag in XHTML, it will define it as a self-closing tag.

XHTML <br> tag syntax is also allowed in HTML. So you should use XHTML as the syntax because it is allowed in both and does not cause confusion. 

Attributes of HTML <br> Tag

HTML <br> tag supports all global attributes such as id, class etc.

Example of HTML <br> Tag

The use of the <br> tag in the lower HTML is explained by the example.




The above example produces output as below.

html-br-tag
HTML-BR-TAG


Previous:- How to use address tag in HTML?

Next:- How to use base tag in HTML?



  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

2 comments:

  1. AnonymousDecember 13, 2018 at 9:55 PM

    Way cool! Some very valid points! I appreciate you penning this write-up plus the rest of the website is
    also very good.

    By the way, I heard about this awsome affiliate program for Instagram influencers.

    Better apply soon before all the spots are filled up.
    Here is the link: http://qtx.de/383sk

    ReplyDelete
    Replies
      Reply
  2. AnonymousJune 12, 2019 at 12:13 AM

    Good way of telling, and good post to obtain information about my presentation focus,
    which i am going to present in school.

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Thank you for reading this post. Please do not enter any spam link in the comment box.

Followers

Blog Archive

  • ►  2020 (4)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
  • ►  2019 (52)
    • ►  December (1)
    • ►  November (2)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  May (11)
    • ►  April (10)
    • ►  March (6)
    • ►  February (3)
    • ►  January (16)
  • ▼  2018 (54)
    • ▼  December (27)
      • How to use html5 nav tag?
      • How to install Google Fonts on your Blogger Blog?
      • How to use section tag in html5?
      • How to use meter tag in html5?
      • How to use time tag in html5?
      • How to use header tag in HTML5?
      • How to use figure tag in html5?
      • How to use aside tag in html5?
      • How to use details Tag in HTML5?
      • How to use wbr tag in html5?
      • How to use article tag in HTML 5 ?
      • How to use menu tag in html?
      • How to use base tag in HTML?
      • How to use HTML hr and br Tag?
      • How to use HTML address tag?
      • How to use HTML Meta Tags?
      • How to use HTML script & noscript Tag?
      • How to use DOCTYPE declaration in HTML?
      • How to use Form Tag in HTML?
      • How to use Block and Inline Tags in HTML?
      • How to use Lists in HTML?
      • How to use Image Tag in HTML?
      • How to use Table Tag in HTML?
      • How to use anchor Tag in HTML?
      • How to Format & Style in HTML?
      • How to use Heading in HTML?
      • What is Attribute in HTML?
    • ►  November (5)
    • ►  May (5)
    • ►  April (4)
    • ►  February (3)
    • ►  January (10)
  • ►  2017 (17)
    • ►  December (9)
    • ►  November (8)

Popular Posts

  • How to use the main tag in html5?
  • How to use keygen tag in html5?
  • How to use html5 mark tag to highlight text?
  • How to start Online Business without money from home?
  • What is a search engine?

Contact Us

Name

Email *

Message *

About MyBlogHelp

Most of the posts, we share on this blog related to Affiliate Marketing, Organic Lead Generation, Digital Marketing, Social Media Marketing, Make Money Online, SEO, and web design.

Featured Post

LeadArk - Affiliate Marketing | Qualified Organic Lead Generation | LeadsArk Review

Copyright © MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
Design by Md. Abdussamad | MyBlogHelp.com