One of the most common mistakes made by programmers is forgetting to close a HTML element.
SO, what do you do? Well, you look to see when the problem first starts. If your whole document is bold, then you can look in your html file and see if you forgot (or accidentally erased) the ending </strong> tag.
Another mistake is having an extra closing tag. So, you do the same thing, go into your html and look at where the problem begins to fail.
HTML validator tool: it will help you see if your HTML is valid or not. How to use the tool:
- copy all of the code.
- In the google search bar type: html validator. It is also: https://validator.w3.org
- You can copy and paste your HTML code in and have it “Check” your code.
- It something is not working, it will reply in red with the errors listed.
- One unclosed </strong> tag will cause a lot of errors.
- If it reply’s in green, it might read: “Document checking completed. No errors or warnings to show.”
Difference checker tool: it will help you see the differences between two different HTML codes that should be the same.
- In the google search bar type: diffchecker. It is also: https://www.diffchecker.com
- Copy and paste your HTML code into the “Original Text” side and copy and paste a different source of that same code into the “Changed Text” side.
- Scroll down to “Find Difference” button and click it.
- It will highlight the differences in different colors.
CSS common mistakes:
- Conflicts between selectors. (Two different margin, color, font-weight).
- Misspelling property names. (Spelling right as rigth, for example).
- Beginners sometimes don’t link up the
<link href=”style.css” rel=”stylesheet” />properly between the HTML and the CSS. - The fix: It is always helpful to go “inspect” your CSS code and see what styles are being applied. You can also make adjustments there before you change anything in your code.