Tags & Elements

Syntax Summary

When it comes to HTML or any other form of programming, you are going to need to know the common terms, vocabulary, the jargon, and slang of the computer science world...otherwise known as syntax.

A common form of syntax you will be using in HTML is known as tags.

Tags are simply just that...tags. They serve as labels to convey information about what is in-between the opening and closing tags...this is essential in markup language.

Another common form of syntax that is usually used with tags, is known as an HTML element.

Tags and elements are commonly associated and used interchangeably, however, they are not exactly the same. Think of it like this, an HTML element is a whole, while a tag is just a part of an element. For you to have an HTML element, you need an opening tag, a closing tag, and the content contained in-between.

How we do...

The formula for a tag is simple to follow...as you need to first create an opening tag. This can be done as such...

Once you have completed the opening tag, you can then add in the content that fits that exact tag. Or, you can do what I do, which is I close the tag, THEN fill out the content...it doesn't matter. 

To close out a tag, you type out the same as you would for an opening tag, except with the addition of a forward slash after the left-angle bracket...as such...

With the inclusion of an opening tag, a closing tag, and the content in-between...you have the makings of an HTML element.

<p>Hello, World!</p>