Common syntax problems – HTML

Preview

To view this and the other 250+ tutorials on Simple Dev, sign up for a 10-day free trial.

Summary

Here’s a list of some common mistakes you might make while writing HTML code.

  • A missing opening or closing tag
  • Missing angle brackets on your opening or closing tag
  • Missing a slash on your closing tags
  • Misspelling a tag or using a tag that doesn’t exist
  • Adding unnecessary spaces inside your tags

Details

Below are examples of what each mistake might look like.

A missing opening tag:

This is a paragraph.</p>

A missing closing tag:

<p>This is a paragraph.

A missing slash on the closing tag:

<p>This is a paragraph.<p>

A missing angle bracket on one or more tags:

p>This is a paragraph.</p

Misspelling a tag or using an element that doesn’t exist:

<h7>This is a heading.</h7>

Note: The browser will still display your text if you use an element that doesn’t exist, but it won’t necessarily be formatted the way you expect. Therefore, you should only use elements that are apart of the HTML language.

If your web page is not rendering in the browser correctly, try going through this list of syntax problems and see if you made any of these mistakes.

References

No references available.

Lesson tags: Open Lesson
Back to: HTML Course > HTML Syntax