Coder Social home page Coder Social logo

riteshgharat.github.io's Introduction

  • Personal Website
  • Generate GST Invoice for free

Perform Arithmetic Operation directly in HTML.

Key Points:

  • Direct Arithmetic Operation in HTML Doc.
  • No need of javascript for Math operation.
  • Can perform basic as we as High level math.

Script:

<!--Math-html.js-->
<script src="https://min.gitcdn.link/cdn/riteshgharat/riteshgharat.github.io/main/math-html/math.js"></script>

Tag:

<!--with math tag-->
<math>2+2</math>

<!--without math tag-->

<!--using Class-->
<p class="math">2+2</p>
<!--using ID-->
<p id="math">2+2</p>

Demo:

  • ✅️ Space must be included after completing operation.
  • ✅️ Text should not be included in "math" tag.
  • ✅️ All most all javascript Math objects are supported.
<p>Operation Value: [2+3*5/6] = <math>2+3*5/6</math></p>
<p>Operation Value: [sin(PI/2)] = <math>sin(PI/2)</math></p>
<p>Operation Value: [PI] = <math>PI</math></p>

Dice:

  <html>
  <head>
  <ttle>Dice Math-html.js</tile>
  <!--stylesheet-->
  <style type="text/css" media="all">
    .dice-con {
      width: 80%;
      height: 250px;
      margin-left: 10%;
      border: 2px solid #000;
      display: grid;
      place-items: center;
    }

    .dice-con .dice {
      width: 80px;
      height: 80px;
      background: royalblue;
      display: grid;
      place-items: center;
      border-radius: 5px;
      border: 2px solid #000;
      font-size: 30px
    }

    .dice-con .btn {
      width: 90px;
      height: 40px;
      border: 2px solid;
      cursor: pointer;
    }
  </style>
  </head>

  <body>
    <h1>Dice using <a href="https://riteshgharat.github.io/math-html/">Math-html.js<a></h1>
    <h2>Demo (Dice):</h2>
    <div class="dice-con">
      <math class="dice">floor(random()*10)</math><br>
      <button class="btn" onclick="location.reload()">Click</button>
    </div>

    <script src="https://min.gitcdn.link/cdn/riteshgharat/riteshgharat.github.io/main/math-html/math.js"></script>
  </body>
  </html>
  • CS project using HTML

riteshgharat.github.io's People

Contributors

riteshgharat avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.