HTML Anatomy

3 2 0
                                        



Before we move forward, it's important that we discuss how HTML elements are structured. The diagram to the right displays an HTML paragraph element.

In this example, the paragraph element is made up of one opening tag (<p>), the "Hello world!" text, and a closing tag (</p>):

Let's quickly review each part of the tag pictured:

HTML Tag - The element name, surrounded by an opening (<) and closing (>) angle bracket.

HTML element (or simply, element) - a unit of content in an HTML document formed by HTML tags and the text or media it contains.

Opening tag - the first HTML tag used to start an HTML element. The tag type is surrounded by opening and closing angle brackets.

Element content - The information (text or other elements) contained between the opening and closing tags of an HTML element.

Closing tag - the second HTML tag used to end an HTML element. Closing tags have a forward slash (/) inside of them, directly after the left angle bracket.

Most elements require both opening and closing tags, but some call for a single self-closing tag. We'll encounter examples of both element types in the next few exercises.

You've reached the end of published parts.

⏰ Last updated: Feb 21, 2018 ⏰

Add this story to your Library to get notified about new parts!

Learn Code - The HackerWhere stories live. Discover now