Learn

HTML tags are the “markup” for HTML. They are annotations that provide information about the type of content they contain. Let’s take a close look at the syntax for how HTML tags surround content to create an HTML element.

The diagram displays an HTML paragraph element. As we can see, the paragraph element is made up of one opening tag (<p>), the content (“Hello World!” text), and a closing tag (</p>).

Let’s quickly review each part of the element pictured:

  • HTML element — a unit of content in an HTML document formed by HTML tags and the text or media it contains.
  • Opening Tag — the element name used to start an HTML element. The tag type is surrounded by opening and closing angle brackets.
  • 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.

Instructions

Study the diagram to the right to learn about the anatomy of HTML syntax. When you’re done, continue to the next exercise.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?