![]() Here’s a good point to explain what you need to do when converting between kilos and, stones and pounds.įirstly, to translate between the values, we need to first convert the kilos to pounds. Let’s handle that now once we’ve got the maths out of the way. Take a look at what the HTML looks like so far - visually, it’s pretty close, but of course, clicking d’at button doesn’t do anything. Both output tags have an ID names stones and pounds - we’ll need those soon enough. A nice touch is that you can specify what elements contributed to this result, which here, is where I use for="kilos" - the INPUT element. I used an OUTPUT tag here, which, to be honest, I hadn’t seen before, but it’s perfect for this because it refers to the result of something. Lastly, wrapped in a DIV are where the results will ultimately be placed. Lastly, I have told the browser that I’d like to allow the arrow functionality to increase or decrease in steps of 0.1, which is 100g - that should be OK.Īfter that comes our BUTTON with an ID of convert which is the thing we will press when we want the conversion to happen. Why did I pick those values? I’m not sure, but for me, I can safely say it’s the lower and upper bounds of where I want to ever be. I’ve pre-seeded it with a value of 90 (don’t ask if that is my weight - that’s not important!), specified a minimum of 30 and a maximum of 120. That’s a type of “number” which means we will get some nice arrow up/arrow down buttons, and can also use the arrow keys. For this, we have used a LABEL and said that it is “for” the INPUT field which is below it. We’ve given it a suitable H1 tag: Convert Kilos to Stones and Pounds. I’ve given it a nice title, as you can see, but what about the main input and output elements? Inside the body tag, add this section of code in we’ll explain it straight afterwards. I know - it’s stunning, but put that aside, we’ve work to do.īegin by creating a new HTML file and call it weight.html. Be able to store the conversion so that I can compare it next time.īy the end of today’s tutorial, the page will eventually look like this:.To convert that value into stones and pounds, displaying the result, and.To allow me type in my weight in kilograms.What would be my incredibly demanding requirements, though? No, I’d rather I had my own one, but even better, it could remember what my weight was the last time I used it. ![]() That is pretty slow and even if I bookmarked the page, I would still have to deal with all the ads etc. ![]() I prefer to see my weight as stones and pounds, so each week, I DuckDuckGo a search, find a calculator site, visit it, deal with their massive page loads, and eventually get the conversion done. But this demonstration does show how mass affects gravity and the weight of objects.My weighing scales - the ones I use to weigh my hefty frame - tell me my weight in kilograms. It would also be impossible to stand on the surface of the gas giant planets like Jupiter and Uranus, because they have no solid surface. Of course, we all know it is impossible to stand on the surface of the Sun. This is because the Sun is so large and its surface is so far from its center, that the pull of gravity is weaker at its surface. You may have noticed that although the Sun is the most massive object in the Solar System, your weight isn't quite as much as you might think. Even though the planets Uranus and Neptune are nearly the same size, Uranus is less dense and has less mass, so your weight would be less.ĭistance also has an effect on the pull of gravity. The mass of an object depends not only on its size, but also its composition. This is why you weigh more on larger, more massive planets like Jupiter and less on smaller, less massive planets like Mars. More massive objects have a stronger pull than less massive objects. Planets and moons are very massive objects and have a very strong pull on other objects. The strength of this attraction depends on how massive the objects are and how far apart they are. All celestial objects in the universe with mass have a measurable pull on all other objects with mass. ![]() This is because it contains more matter and is therefore more massive. If you had two bricks, one made of concrete and one made of lead, the lead brick would weight much more. The mass of an object is a measure of how much matter it contains. Your weight on the planet Earth is a function of our planet's mass. Then, click the "Calculate" button to see what you weigh on the planets and moons listed below: If your Web browser supports Flash, you can click in the box below and enter your weight. Have you ever wondered how much do you weigh on other planets? Now you can find out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |