From the course: HTML for Programmers

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Anatomy of an HTML element

Anatomy of an HTML element

From the course: HTML for Programmers

Anatomy of an HTML element

- [Instructor] HTML elements are defined by a series of tags. Let's say we're writing a blog post. Typically, the first element of a blog post is the title. We can create a title with the H1 or Header 1 element. We create a tag with a set of angle brackets. The closing tag looks exactly like the opening tag, but there's a forward slash before the tag name. This indicates that this is the end of the heading element. The opening tag, the content, and the closing tag together are known as the HTML element. Most HTML tags have both an opening and a closing tag, but some tags like the image tag and the input tag, are self-closing. In these tags, there is no content to encapsulate within the opening and closing tags. All the content is contained within the opening tag. We can also set attributes on HTML elements. Attributes are characteristics for that tag, which give it different functionality or meaning, but they don't appear…

Contents