Celsius to Fahrenheit by Porphyrogennitos

Practice project.

How could I make my HTML, CSS, and JavaScript better?

Hi @Porphyrogennitos !

I think your project looks good.

When the user enters a word or nothing you might consider changing the error message from NaN to “Invalid input. Please enter a number”

That way both developers and non developers can understand that error message.

Also, for future projects, you might consider assigning your getElementById to a variable since you plan on reusing it throughout the page.

const getCelsius = document.getElementById("celsius");
const getFahrenheit = document.getElementById("fahrenheit");

Keep up the good work!

1 Like

It looks good. Some things to revisit;

  • Make the input area bigger. What if I want to enter -1000? Even something like 233 gets cut off.
  • Have it round to one, at most two decimal places. Putting in 233 gives a lot of decimal places.
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.