We all know HTML; chances are that at least once in our life, we must've seen and worked with HTML or markups in general. For those of us doing any web development, we regularly eat, sleep and occasionally dream HTML, apart from other things. We might've learned these things during our years of working with markup; but just in case, so as not to forget, I'm writing them down.
- HTML is for defining content! HTML markup is used to define your document and give it a semantic structure.
- Know what each tag does, what all attributes they share and what makes them different. Understanding this will give you a clear idea of what type of tag you need to use with different types of data.
- Using a strict DOCTYPE can save you a lot of trouble later.
- Know and understand the Box Model.
- Know and understand the difference between a block level element and an inline element.
- Know and understand that certain elements can contain other elements while other cannot.
- You can have multiple paragraphs in a div; But you cannot have a div inside a paragraph or a paragraph inside another paragraph - Use attributes and metadata and as much accessiblity information as possible. This can make your website accessible to anyone over any platform using any hardware
- Keep in mind that each tag has a default set of attributes assigned to them and they can be manipulated using css later on if needed.
- Just because a tag changes its appearance of its contents to something you want doesn't mean it can be used to do so. Tags are used to define the content they hold and Styles(CSS) are used to change its appearance.
- Avoid applying inline css like the pleague! Absolutely no inline css, attributed or tags that affect the appearance of your output!!
- Know when to use classes and Ids. Know the difference! Ids *must not* be used on more than one element. They have a higher precedence when it comes to styling.
#container .myStyle { ... } will win over .myStyle { ... }
Apart from these, there might be more things you've come across, feel free to add them as a comment below.


