Table of Contents
How do I organize my HTML code?
8 HTML & CSS tips for organizing code in your web project
- Set up your foundation.
- Create CSS Variables.
- Configure “ready” classes.
- Use Flexbox to your advantage.
- Write your HTML with responsive in mind from the beginning.
- Use comments in CSS to make finding code a breeze.
- Adopt a naming convention and stick to it.
How do you arrange codes in Python?
Assume you currently have everything in a file called main.py :
- Create another source file in the same folder (let’s call ours utils.py for this example)
- Move whatever classes, functions, statements, etc you need from main.py into utils.py.
- In main.py add a single line at the top: import utils.
How do I make my HTML look neat?
Writing semantically correct and clean HTML
- Use Proper Document Structure.
- Always Write Standards-Compliant Markup.
- Indent the code.
- Keep the Syntax Organised.
- Make Use of Semantic Elements.
- Use Tag Only Once Per Page.
- Exterminate “Divitis”
- Avoid Too Much Commenting.
How do I make my HTML code look good?
To respond to this story,
- 8 Best Practices to Write Clean HTML Code. Sergi Marquez.
- Give a f**k. Seriously.
- Indent. Indented code is easier to read, easier to understand, easier to modify, and easier to maintain.
- Just Be Consistent.
- Exterminate “Divitis”
- Avoid Comments.
- Class = “clear-name”
- Use Whitespace.
Where should I store my coding files?
Okay, so to recap:
- Leave IDE defaults alone.
- Use a cloud IDE when you can (most have decent free services).
- Learn Git. (This should probably be ranked number 1).
- Use GitHub, Bitbucket, or GitLab for hosting your projects.
- Keep your local repositories flat. No nested folders of folders!
- Spinal case your project names.
What does Setup py do?
setup.py is a python file, the presence of which is an indication that the module/package you are about to install has likely been packaged and distributed with Distutils, which is the standard for distributing Python Modules. This allows you to easily install Python packages.