Exam #1 Celsius Problem

In this example below you will see how to do a Exam #1 Celsius Problem with some HTML / CSS and Javascript

This awesome code was written by AdrianaDonkers, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright AdrianaDonkers ©
  • HTML
  • CSS
  • JavaScript
    <p><input id="celsius" type="number" placeholder="Type In a Number"></p>
<p>The Temperature is: <span id="kelvins"></span></p>

/*Downloaded from https://www.codeseek.co/AdrianaDonkers/exam-1-celsius-problem-ZXvmgB */

/*Downloaded from https://www.codeseek.co/AdrianaDonkers/exam-1-celsius-problem-ZXvmgB */
    const temperatureInCelsiusBox = document.getElementById('celsius');
const kelvinsSpanBox = document.getElementById('kelvins');
temperatureInCelsiusBox.addEventListener('input', kelvinsConverter);

function kelvinsConverter() {
  const temperatureInCelsius = temperatureInCelsiusBox.value;
  temperatureInKelvins = temperatureInCelsius + 273.15;
  kelvinsSpanBox.innerHTML = temperatureInKelvins;