Beginner HTML

Elements and Structure

Topic Description
HTML HTML (HyperText Markup Language) is used to give content to a web page and instructs web browsers on how to structure that content.
HTML Element An HTML element is a piece of content in an HTML document and uses the following syntax: opening tag + content + closing tag. In the code provided:
  • <p> is the openting tag.
  • Hello World! is the content.
  • </p> is the closing tag.
HTML Tag The syntax for a single HTML tag is an opening angle bracket >; followed by the element name and a closing angle bracket <. Here is an example of an opening <div> tag.
Element Content The content of an HTML element is the information between the opening and closing tags of an element.
Closing Tag An HTML closing tag is used to denote the end of an HTML element. The syntax for a closing tag is a left angle bracket < followed by a forward slash / then the element name and a right angle bracket to close >.
<body> Body Element The <body> element represents the content of an HTML document. Content inside <body> tags are rendered on the web browsers.

Note: There can be only one <body> element in a document.

HTML Structure HTML is organized into a family tree structure. HTML elements can have parents, grandparents, siblings, children, grandchildren, etc.
<h1> - <h6> Heading Elements HTML can use six different levels of heading elements. The heading elements are ordered from the highest level <h1> to the lowest level <h6>.
<div> Div Element The <div> element is used as a container that divides an HTML document into sections and is short for “division”. <div> elements can contain flow content such as headings, paragraphs, links, images, etc.
HTML Attributes HTML attributes are values added to the opening tag of an element to configure the element or change the element’s default behavior. In the provided example, we are giving the <p> (paragraph) element a unique identifier using the id attribute and changing the color of the default text using the style attribute./td>
Attribute Name and Values HTML attributes consist of a name and a value using the following syntax:name="value" and can be added to the opening tag of an HTML element to configure or change the behavior of the element.
Unique ID Attributes In HTML, specific and unique id attributes can be assigned to different elements in order to differentiate between them.

When needed, the id value can be called upon by CSS and JavaScript to manipulate, format, and perform specific instructions on that element and that element only. Valid id attributes should begin with a letter and should only contain letters digits (0-9), hyphens (-), underscores (_), and periods (.).

This page is under construction!

Check back soon to see if we've added anything

-or-

Sign up for our mailing list, and we'll keep you updated!