02: Tags in Detail

I'll cover the different types of tags in the html5 specification and then explain which ones you do or don't normally use.

Void Elements

You might run into an inconsistency between some tags that are formed as <tag>...</tag> but others that seem to use <tag/> as if combining the beginning and ending tags into one tag, and others are just a single tag as in <tag>. What's going on?

First, void elements (tags) don't have any "child elements", which means they have no contents. That means this isn't valid HTML:

Learn JavaScript Today

Register today for the Beginner Basics course and get the new releases by just paying the difference. There's also special discounts for existing customers when new courses are released.

Still Not Sure? Check out more curriculum!