SIGN UP MEMBER LOGIN:    
ARTICLE

Output Tag - HTML 5

Posted by Vijay Prativadi Articles | HTML 5 February 11, 2012
Today, in this article let’s dig out one more concept in HTML5. This concept displays an output when performed some calculations.
Reader Level:

Introduction

Today, in this article let's dig out one more concept in HTML5. This concept displays an output when performed some calculations.

What is Output Tag in Html 5?

In Simple terms "It produces an output result based on calculations, passed as an input by the user".
So, I think we all are now good to go and implement this concept.

Step 1: The Complete Code of Output.html looks like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
       Remove this if you use the .htaccess -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <title>templates</title
>
  <meta name="description" content="" />
  <meta name="author" content="Vijay" />

  <meta name="viewport" content="width=device-width; initial-scale=1.0" /> 
 
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
  <link rel="shortcut icon" href="/favicon.ico" temp_href="/favicon.ico" />
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" temp_href="/apple-touch-icon.png" />
</head>
<
body style="text-align: center; font-family: Verdana; font-size: 22">
  <div
>
    <header>
      <h1 style="color: gray">Output Tag - HTML 5</h1>
    </header>
<form action="" id="addform">
<div align="center">
       <table><tr><td>      <input name="firstnum" type="number" required="true"/> +</td><td>  
 <input name="secondnum" type="number" required="true"/></td></tr><tr><td><input type="submit" value="Calculate"/></td></tr></table
>      
       <table
>
              <tr>
                     <td><p>Addition Result is:</p><b><output name="addresult" form="addform" style="color: red"  onforminput="value =
                                firstnum.valueAsNumber + secondnum.valueAsNumber"></
output></b></td></tr
>
              <tr><td><p>Substraction Result is:</p><b><output name="addresult" form="addform" style="color: red"  onforminput="value =
                                firstnum.valueAsNumber - secondnum.valueAsNumber"></
output></b></td></tr
>
                     <tr><td><p>Multiplication Result is:</p><b><output name="addresult" form="addform" style="color: red"  onforminput="value =
                                firstnum.valueAsNumber * secondnum.valueAsNumber"></
output></b></td></tr
>
                     <tr><td><p>Division Result is:</p><b><output name="addresult" form="addform" style="color: red"  onforminput="value =
                                firstnum.valueAsNumber / secondnum.valueAsNumber"></
output></b></td
>
              </tr>
       </table>     
</div>
</form>
    <footer>
     <p style="color: silver">&copy; Copyright  by Vijay Prativadi</p>
    </footer>
  </div>
</body>
</
html>

Step 2: The Output of the Application looks like this:

Clipboard01.jpg

Login to add your contents and source code to this article
share this article :
post comment
 

Thanks for the Suggestions Sir!!!.......Sure I will follow what you said...

Posted by Vijay Prativadi Feb 12, 2012

Keep article title without special characters. That makes your article high ranked in search engines. For example, title of this article should be "Output Tag in HTML 5" or "HTML 5 Output Tag". I also wrote little more about the tag as a control and what's it purpose. For example, I changed this article: http://www.c-sharpcorner.com/UploadFile/54db21/progress-and-mark-tags-html-5/ Keep up the good work! Cheers!

Posted by Mahesh Chand Feb 12, 2012
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Gauge for SharePoint
Become a Sponsor