HTML Review

Main Page

HTML is the structure and content of a page

HTML elements are building blocks of a page: headings, paragraphs, links, images and more.

HTML elements consist of an opening tag and a closing tag

Void elements such as image or meta have only an opening tag and cannot hold any content

An attribute is a value placed inside the opening tag of an element. It provides additional information about the element or specify how it behaves.

A boolean is an attribute that can either be present or absent in an html tag. Boolean attributes include disable, readonly, required

Headings go from 1 to 6. They are used to signify the importance of content below them.

Sections are used to divide content into smaller sections

Divs dont hold any semantic meaning

ul for unordered lists and ol for ordered lists.

em element is used to place emphasis on a piece of text

strong element to place strong emphasis. Bold

Figure element is used to group content like images and diagrams together. Figcaption is used to write a caption for the element inside that figure

The body element is where the content of the page is placed

Anchor element a is for links

Footer element is where copyright information is usually placed, etc

IDs are used to assign unique identifiers to elements and should be used only once per document

Classes are used for styling and behavior. You can reuse the same class throughout the document

There are special characters <img />

Where do you use the Main element?

A replaced element example is iframe (inline frame)

Here is an iframe example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/PkZNo7MFNFg?si=-UBVIUNM3csdeiWF" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen ></iframe>

Link is used to link external resources