HTML+Best+Practice

=Best HTML Practices = For those who are just diving into web development, you need to establish good habits. If you’ve one year of experience or less, hopefully some of the tips listed here will help you to become better, quicker!

1. Always Close Your Tags
Always, always close your tags. Otherwise, you’ll encounter validation and glitch issues at every turn. I tend to think “if I open a door, I need to close it, or it will let the bugs in.” Stupid phrase, but it sticks in my brain.

2. No spaces between your attribute/value sets
Some browsers can be picky about having spaces in between attributes. To be safe, keep the attribute/value sets together, but place one space between individual sets.  GOOD:  BAD: 

3. Keep Your Tag Names Lowercase
Technically, you can get away with capitalizing your tag names. But if you keep everything lowercase, it will simplify your life. You’ll never have to think to yourself “did I capitalize it or not?” You’ll be more prone to making typos. Web design programming, in most instances, is case-sensitive, too.

4. Use H1 – H6 Tags
Use the tags appropriately, and never reverse it’s semantic value. For example, don’t make your least important headline in h1, and your most important in h6. You will destroy your SEO opportunities (Search Engine Optimization).

5. All Images Require “Alt” Attributes
It’s easy to ignore the necessity for alt attributes within image tags. Nevertheless, it’s very important, for accessibility and validation reasons, that you take an extra moment to fill these sections in. 