HTML and HTML/JavaScript interaction particularly relating statistics calculator program

I am not sure which parts of that are questions and which parts are you quoting something else, could you try please to format more clearly?

Part of the problem is when I initially started writing I was assuming a numbered bullet for each question and then realised 3 merged into 1 I also somewhat trying to do it quickly. I have rewording and integrating what I said that was based on what I said another day into the new bits. I try quote my intially questions but the numbering was lost in the partial quotes. I have likely said everything still relevant from initial questions here anyway so quoting them, may only have caused confusion anyway.

On my original question 1, I now largely understand what tags and elements are but I get confused what constitutes an elements when it is has child elements. Is almost all of HTML file one element by being enclosed in <html/> and </html> tags whilst also being part of at least one more. Alternatively is one of these the case, a element does not include its children or there is a limit to how much an element includes.

What I would still like to know on my on initial 3,5,6 links together. Is it important to understand why, the style element is placed where it is and what return false; is doing. Particularly if at least one of them is no, what is it important to understand in the HTML and CSS code. For example, understanding every tag, selector, attribute, unit, etc but not fully understanding why the program works.

everything inside an element is also part of an element

are you talking of the script element?

It depends on what you want to understand

verything inside an element is also part of an element

are you talking of the script element?

No taken from the following line (should be line 13 of index.html).
<form onsubmit="calculate(); return false;">

but calculate comes from the script element, the style element would not matter here as it is CSS, not JavaScript

All return false; does there is prevent the form from submitting. That’s a little dated, though, since the current way to do that is to use e.preventDefault() in an event listener that listens for the form’s submit event.

Let answer the bit before first and then see about this bit. However I will say in case you think I am, I am not talking about different executable approach’s to a program largely disregarding best practice.

Thankyou I take it this is a reflection on when the program was written. For what I can tell this program in not in the new course.

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