Are HTML tags and elements the same thing, basically the same thing, or different. If the latter or if you otherwise feel it is beneficial what is important to know.
Is all the HTML/CSS in this certification either covered in the HTML/CSS certification or when not explained. I suspect the answer is no but memory is not total.
It is important to properly understand all the HTML/CSS in the programs or just how it interact with the javaScript.
For program disregarding javaScript interactions I will talk about below the only part did not recognise was Dfn element which I have read up on and seems to be used in this program as a way to italic text while fitting the purpose of the tag. Let know if there is more to know
I notice the way the interaction between to html and javaScript code is done is different with the script being at the end of head element instead of the end of the body element. It is this done to allow for the inclusion of this line of code in the HTML file <form onsubmit="calculate(); return false;">
What is the return false; part’s purpose.
Sorry for the length of this message and covering multiple points but thought it was better to have one post than multiple.
I will come to points 1 to 3 another day for now I will say what you said was helpful. To allow you are potentially others to help me more I will expand on points 4 to 6.
4. Repharsing my question, is there a reasons for words in this program to be placed in tags beyond it allow them to be italicised and those are the words that are getting definitions in p elements.
5. My point here was not well written. I think the function you thought I was referring is <script src="./script.js"></script> to my understanding not a function . That is what I meant by script. If you are instead referring to calculate() it is in line 13 of index.html and lines 49-67 of script.js.
6. return false is an extract from the above copied text (line 13 of index.html).
After maybe the next half hour, I will not be checking for reponses till at least Monday and likely Wednesday or later. So feel free to take your time.
You’re asking why the script element is in the head element and not the body. You’ve surmised that’s because the HTML references a JS function so you need to load the JS before this line.
It’s a good guess. I’m not 100% but I think you’re correct. You should test this yourself locally. Move the script element to the bottom of the body and see if you get an error.
You can also experiment with removing the return false line.
In my own words that a Dfn element has to be placed with within an element explains (gives a definition to) the word in dfn tags. In this case in a p element. I suppose put a different way I am trying to understand the purpose of dfn tags are they there just to aid readability to someone viewing HTML code particularly not the writer or as is likely to case have some necessary purpose in website creation (struggle for the right word unsure it was web development).
I have assumed here you can have elements within elements something I was going to check when I get back to point 1.
I am having issues including quotes in my post correctly. I think you can see what of the quote relates to that message. I will respond to the rest in a few hours
I think you are referring to style/appearance vs semantic elements.
Some elements tell the browser only how text should appear, for example <i> tells the browser to show the text in italics, but not why or what meaning that has.
In contrast <em> tells the browser that this word is important and needs emphasis. Most browsers will do this with italics.
I am nearly there with understanding it. However I feel you may need to say more on semantic non-semantic elements. It does not help that I cannot find list of some length of non-semantic elements only div and span with it appears dfn another one. Might also be helpful to have a sentence to explain it. Instead of the succeeding sentences, what is a better more accurate way of putting it. “Some tags are there just to aid readability to someone viewing HTML code, and do not affect what a webpage reader/user sees and does just from the GIU.”
You’re asking why the script element is in the head element and not the body. You’ve surmised that’s because the HTML references a JS function so you need to load the JS before this line.
It’s a good guess. I’m not 100% but I think you’re correct. You should test this yourself locally. Move the script element to the bottom of the body and see if you get an error.
You can also experiment with removing the return false line.
[/quote]
I have tried those edits there was no change. Now you have stated you do not fully understand the code and it maybe can be implied do not need to I now may need to know more about my original question 3. I may need to hear more in way of response to my original question 3. I took Jeremy’s original reply to that and question 2 to indicate it was important, I understand every part of the HTML code. However as you do not know parts of it, do I or is it just nice to know if I am intrigued.
Now finally time to address Jeremy reply to point. In short it appears I have got it. A element either starts with a opening tag and ends with a closing tag and usually has something in the middle or are void with essentially just an opening tag. The only place I am not sure is when an element contain other elements. I know child elements are a thing. Is almost all a HTML file one element by being enclosed in “” and “” 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.
I can’t explain it any better than I have and it’s been explained many times before. I would suggest searching for more answers on this until you find an explanation you are satisfied with.
You should make sure you are using JS “strict” mode which the fCC editor uses. Other than that I guess the answer to your question would be “no”. It could be that it’s just not required to be at the end of the body element in this case and so is loaded in the head.
I think I understand for dfn tag if I don’t truly getting it a greater sense that is not a problem. I also became to hung of semantic element something I did bring up. Jeremy probably thought was refering to them without necessarily knowing the name when I think I was not. What ILM said helped me.
I happy if people feel like they have nothing more they would like to say to consider this thread finished.
There is more it would be nice to know on points 3, 5,6. There something more I could know on point 1 but I think that is really get the stage of asking about something that is probably very unnecessary and should become clear in further study. However as I have already expended much of your: time, brain power and emotions along with how it important to know this information appears to be I can stop here. If you want me to point what it would be nice to know on those points let me know. For know I will stay don’t worry that there is anything new I have not already said.
As I have already, sort of done higher up, I want to thankyou for help/reponses and everything that comes with that. I apologies for my wordiness, sometimes tone and my overanalysing flaws. Both sentences apply to other threads too.
Speaking to just ILM and Jeremy, I note for whatever reason you seems to be responsible, for the lion share of responses to my posts and I thankyou for dedication to replying to me and dealing with my challenges as poster to reply to.
If you have more questions you can ask them, people will respond when they can, you do not need to worry about expending too much other people time, if they are on the forum to help they are here to give their time to who need it
It may helpful to understand how child element affect what counts as elements for the adult element see this post for more detail. I know child elements are a thing. For detail here something I said before slightly edited.
“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.”
3,5,6 link togther is it important to understand why, the style element is placed where it is and what return false; doing. Particularly if at least one of them is no, what is it important to understand in the HTML and CSS code. For example there is not a tag, attribute, unit, etc you don’t understand what it is.