Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML and CSS best practices. #6

Closed
mailsg opened this issue May 15, 2023 · 0 comments
Closed

HTML and CSS best practices. #6

mailsg opened this issue May 15, 2023 · 0 comments

Comments

@mailsg
Copy link
Owner

mailsg commented May 15, 2023

  1. Self-Closing Tags: While HTML5 allows self-closing tags, it's preferable to include the closing slash (/) for consistency across different HTML versions. Update the self-closing tags in the code as follows:
    <input type="text" class="placeholder" placeholder="Add to your list..." />

  2. Whitespace and Indentation: Consider adding consistent indentation and whitespace to enhance the code's readability and maintainability.

  3. Use Meaningful Class Names: Consider using more descriptive and meaningful class names to improve code understanding. For example, instead of .flex, you can use .flex-container or .flex-wrapper to provide more context.

  4. Consider organizing your styles in a logical order. For example, organizing can start with global styles (such as * and body), followed by container styles, and then specific element styles.

  5. Adding comments to the CSS code can provide clarity and make it easier for others to understand your intentions and the purpose of specific styles.

@mailsg mailsg closed this as completed Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant