@BikeInMan
Posted
Congratulations! It looks perfect.
About your question, there is no right answer here for these challenges.
I think, if you don't have "issues" in the report, that is one way to confirm your code is right. Other than that, I think following best practices will ensure you are writing quality code.
In your code, you have mixed ids and classes in css. Most people use classes for styling and IDs to program in Javascript. IDs can't be repeated in a page, but classes can.
Good Luck.
@Hade21
Posted
@BikeInMan thankyou, i'm just newbie here so i think that should be one of the right answer. So, everything we write in the code is right as long as no issues on our code?
@BikeInMan
Posted
@Hade21 No, that's not what I meant in all cases and all programming languages. But when it comes to HTML and CSS, they are a declarative and do not have language constructors as in JavaScript or other programming languages. For these two, it partly answers your questions. For larger projects, companies have their own style guides for each languages to ensure we write code in a consistent manner for future developers to support them.
I think, simplicity, consistency, meaningful comments and choice of variable names go a long way in terms of good code.
For CSS, you may want to check out, http://getbem.com/naming/, which is quite popular among seasoned frontend developers.
If you are talking about efficiency and performance, that is a different topic.
Marked as helpful
@Hade21
Posted
@BikeInMan okay, thakyou for new lesson. i"ll read more about that. thankyou very much