@davidochoadev
Posted
Hi @HectorAgValenzuela,
First of all congrats for your solution! ๐ I've reviewed your source code, and after analyzing the structure, I have a few suggestions for future improvements. It's always a good practice to properly structure the code within the <body>
element by using predefined semantic elements. I recommend checking out this link.
This resource explains the concept of semantic HTML without going into too much detail and highlights its importance, particularly for SEO and accessibility purposes. One specific suggestion I have is to utilize the <main>
and <footer>
tags in your HTML code, as they provide several benefits:
-
Semantic structure: By incorporating the
<main>
and<footer>
tags, you establish a semantic structure for your HTML document. These tags clearly indicate the main content and footer sections of your webpage, enhancing the accessibility and maintainability of your code. This approach reflects the logical organization of your content. -
Accessibility: Semantically structuring your content using
<main>
and<footer>
tags improves the accessibility of your website. Assistive technologies, including screen readers, can easily identify these sections, making it more convenient for users with disabilities to navigate through the main content and locate important information in the footer. -
Search engine optimization (SEO): Search engines like Google rely on semantic HTML to understand the structure and meaning of webpages. Utilizing the
<main>
and<footer>
tags provides clear indicators to search engines regarding the primary content and supplementary information on your page. This can positively impact your search engine rankings and improve the visibility of your website. -
Code organization and readability: Incorporating dedicated tags like
<main>
and<footer>
enhances the organization and readability of your HTML code. Other developers working on your codebase or maintaining your website will have a clearer understanding of the purpose and structure of different sections. This makes it easier to update or modify the code in the future.
To address the issue at hand, I suggest removing the margins and ensuring that the card is placed inside a container that occupies the entire screen both in terms of height and width (you can use <main>
๐ผ). This way, you can utilize flexbox to center the card structure.
By adopting semantic HTML and utilizing tags like <main> and <footer>, you not only enhance the accessibility and search engine visibility of your website but also improve the overall maintainability and understandability of your codebase. This best practice contributes to better user experiences and efficient web development workflows.
Let me know if you have any questions or need further assistance.
Best regards,
David Ochoa. ๐๐ป
Marked as helpful