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

Sunday, January 13, 2019

How to use output tag in html5?

 MyBlogHelp     January 13, 2019     html     2 comments   

html5 output tag
USE OF HTML5 OUTPUT TAG

HTML5 <output> Tag

The HTML <output> tag represents the result for calculation. This is a form element. It is used to show the output after the calculation which performs the values entered in the form.
You have seen many sites which perform some kind of calculation and show the results. Such as which provide services of the calculator, convert binary into decimal, and convert the measurement (Feet, Centimeter) etc.

Similarly, there are many other types of sites like related to tax, insurance, and loans etc. which show results by performing the calculation. Before HTML5, there was no way to mark the results shown by these sites but HTML5 has introduced the <output> element to mark results produced by web applications.

Syntax of HTML5 <output> Tag

The general syntax of the <output> tag is given below.

 <output> Result here </ output>

As you can see in the above syntax, this tag does not have any value attribute. The result is shown as text between the opening and closing tags by the <output> tag.

Attributes of HTML5 <output> Tag


You have three attributes available with the <output> tag. These are given below.

           for


In this attribute, those elements are defined which have been used in value calculation. The id of these elements is written separately from the comma in this attribute. For example, if you are entering 2 values from text to the user in the text box, then in this attribute, both text boxes will be written separately from id comma. The syntax of this attribute is given below.

 <output for = "element1-id, element2-id"> result </ output>

           form 


This attribute is defined by the form, which is output related. The id of the form is specified as the value of this attribute.

           name

The output tag is defined by the attribute.

The <output> tag also supports all Global and event attributes of HTML.

Example of HTML5 <output> Tag

<!DOCTYPE html>
<html>
<style>
output
{
                                     background-color: red;
                                     color: white;
                                     padding: 10px;
}
</ style>
 <body>
 <form onsubmit = "return false" oninput = "result.value = parseInt (a.value) + parseInt (b.value)">
 <input type = "number" id = "a">
 <input type = "number" id = "b">
 <output name = "result" for = "a b"> 0 </ output>
            </ form>
 </ body>
 </ html>


In the above example, the value of the user input box will change and the output value will also change. This example produces the below output. 



output Tag example
HTML5 output Tag example

Compatible Browsers

      The list of the browser's first version which supports output tag.

          1. Google Chrome 10.0
          2. Firefox 4.0
          3. Internet Browser 13.0
          4. Opera 11.0
          5. Safari 5.1


       << PREVIOUS                                                                                  NEXT >>




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

2 comments:

  1. AnonymousJanuary 14, 2019 at 12:16 AM

    I am really impressed together with your writing abilities and
    also with the structure in your blog. Is that this a paid subject
    matter or did you modify it your self? Either way stay
    up the excellent high quality writing, it is rare to
    see a nice blog like this one these days..

    ReplyDelete
    Replies
      Reply
  2. AnonymousSeptember 11, 2019 at 1:28 AM

    Quality content is the crucial to invite the people to
    pay a quick visit the site, that's what this site is providing.

    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)
      • What is bootstrap and its major advantages of crea...
      • What is CSS? CSS Tutorial 01
      • How to use input attributes in html5?
      • How to use input type in html5?
      • How to use output tag in html5?
      • How to use keygen tag in html5?
      • How to use datalist tag in html5?
      • How to use svg tag in html5?
      • How to use canvas tag in HTML5?
      • How to use the track tag in html5?
      • How to use source tag in html5?
      • How to use embed tag in html5?
      • How to use the main tag in html5?
      • How to use Ruby tag in html5?
      • How to use html5 mark tag to highlight text?
      • How to use html5 footer tag?
  • ►  2018 (54)
    • ►  December (27)
    • ►  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