Assessment wanted for Structuring a page of content_Samson

Dear fellows,

It is my pleasure to be one of the members here. As I am getting stuck during structuring a page of content, as I have added the coding to my file index.html, but the output is different from the display as below.

https://wiki.developer.mozilla.org/zh-TW/docs/Learn/HTML/Introduction_to_HTML/Structuring_a_page_of_content

My files including the index.thml and style.css have been uploaded into Codepen@samsonsum3, does there anyone could help ?

Would be much appreciated !! Thank you.

Samson

Hello @samsonsum3

hope that everything going fine with you

unfortunately i can not access anything from your work maybe you make your pen at codepen private

can you make the pen you need help with public so i can access it

have a nice day :slight_smile:

Hello @justsomeone

Thanks for your warm support !!

I have put it into my project file and set it as public, is there anything I am missing which makes other visitors cannot reach my file ?

I guess this link would be available for you, do you? :blush:

@justsomeone

Would this link be available for you to reach now ? :blush:

you welcome
i can access it now
just a moment to check it :slight_smile:

Hello @samsonsum3

you need to wrap each part with the most suitable html structure element
for example you wrap the first h1 and nav into header element and wrap the list item in nav element

wrap the end of the file in footer element and the list of image in aside element and the welcome and the aside should be inside the main element

i tried to do it here hope i did not forget any point

hope that help and have a nice day

1 Like

Thank you so much justsomeone~

Your material is very comprehensive and useful, thanks for displaying all the codes for me to review with the explanation as well. I fully understood now, it is very grateful to see the final outcome comes in front of my laptop here.

Much appreciated and have a nice day. :relaxed:

Thank you so much @justsomeone~

Your material is very comprehensive and useful, thanks for displaying all the codes for me to review with the explanation as well. I fully understood now, it is very grateful to see the final outcome comes in front of my laptop here.

Much appreciated and have a nice day. :relaxed:

you very welcome @samsonsum3

thanks a lot and you too :slight_smile:

Hello @justsomeone, how are you?

May I ask you something about javascript ? :blush:
As I have created a personal project for myself to brush up my skill, the script could be luckily run, but I believe there are something that can be improved ?

Waiting for your feedback, thanks so much!!!

@justsomeone
I have put it in codepen under public area:
my ac: samsonsum3
[Project: Staff Checking Test]

Thanks a lot.

Hello @samsonsum3

i am fine thanks what about you ? :slight_smile:

sure you can it’s honor to help you and i am currently checking it but just want to make it clear that i am student as you here but i will do my best to help you :slight_smile:

you very welcome and have a nice day :slight_smile:

now for your questions

Questions
// Q.1. How to modify and make the scripts look better and readable ?
it could be better but i assume you did not get to the class leason yet which will help you alot and make reusable object so do not worry about that yet as i think you just got to the conditional statement

// Q.2. Whenever I enter a new Associative Array e.g staff8, I need to do extra four steps further, including Step 1 - adding new staff.dataUpload at the back in variable totoalNoOfDataUpload. Step 2 - call function staffChecking () by entering new argument e.g staffChecking(staff8),
// … Step 3 - Adding new staff.dataUpload at the back in variable highestScore. Step 4 - call function getHighestScoreOfStaff () by entering new argument e.g getHighestScoreOfStaff(staff8). Would it be able to shorten the steps to make it run efficiently ?

this will be fixed after loop leason and also class will make it even better and create array that hold all those object and use the loop to iterate for all object so no matter how many object the loop will run for all of them

// Q.3 For the [ if command ] I use, is there any better command would be better than this to run the program ?

you can use Ternary statement for the highest score thing like following

( staff1.dataUpload === highestScore ) ? console.log(staff1) : ( staff2.dataUpload === highestScore ) ? console.log(staff2) : ( staff3.dataUpload === highestScore ) ? console.log(staff3) : ( staff4.dataUpload === highestScore ) ? console.log(staff4) : ( staff5.dataUpload === highestScore ) ? console.log(staff5) : ( staff6.dataUpload === highestScore ) ? console.log(staff6) : console.log(staff7) ;

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals#Ternary_operator

just note i used the console log here of course you can use the alert as you did in your function

hope that help and happy trip with your lessons and have a nice day :slight_smile:

Hello @justsomeone

I am good too, thanks a lot. Wow it’s great that you are still learning, did your school of academy being affected by the virus ? :neutral_face:

Thanks for your kind support. :blush:

Wow your explanation is very detailed and useful to me… Thanks so much~ :grin: :grin:

Yes you got me, I am now getting to the conditional statement, actually I am ready to go for the DOM, and the class as you mentioned. I am very eager to learn those techs, it seems very useful, thanks for this reminder.

Wow, let me also have a try on Ternary statement. Does that mean if I use this statement, I don’t need to extra call the function like below:
getHighestScoreOfStaff (staff1);
getHighestScoreOfStaff (staff2);
getHighestScoreOfStaff (staff3);
getHighestScoreOfStaff (staff4);
getHighestScoreOfStaff (staff5);
getHighestScoreOfStaff (staff6);
getHighestScoreOfStaff (staff7);

Thanks so much. :blush: :blush: :blush: :blush:

glad to hear that learning is a endless process :wink: the whole world affected by that hope things get better soon
and you very welcome @samsonsum3 :slight_smile:

thanks a lot for your nice words and you very welcome :smiley:

good luck with your learning journey and you have 2 option drop the gethighest funtion and use this code or edit the function so it code become the ternary statment and you would not need the function to have any parameter so you change it to be getHighestScoreOfStaff (){

}
but as you see it still victim to that it need to be updated when you add new object so loop will be better but of course when you get there

good luck and have a nice day :smiley:

@justsomeone

I understand now. Thanks a lot for your help. Wish you have a great learning journey as well, and stay safe, most importantly…

Let me keep studying and hope can reach the new object and loop you are talking about.

Good day and have an awesome weekend~ :cowboy_hat_face: :cowboy_hat_face: :cowboy_hat_face: