HyperText Markup Language (HTML)
Introduction
HTML is the standard markup language for creating Web pages. HTML (HyperText Markup Language) is
used to give content
to a web page and instructs web
browsers
on how to structure
that content.
What is HTML?
- HTML stands for Hyper Text Markup Language
- HTML is the standard markup language for creating Web pages
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
- HTML elements label pieces of content such as "this is a heading", "this is a
paragraph",
"this is a link", etc.
HTML Elements
HTML (Hypertext Markup Language) elements are the building blocks of web pages. They are used to
structure and
present content on the web.
Each HTML element is represented by a tag enclosed in angle brackets
(<>) and typically
consists of an opening tag, content, and a closing tag. The opening tag indicates the
beginning of the element,
and the closing tag signifies the end. The content placed between these tags can include
text, images, links,
and other media, and it is formatted and displayed by web browsers according to the
element's purpose and
attributes.
HTML elements are essential for defining the structure and layout of web pages,
making them the foundation of web development.
Content Sectioning
Content sectioning elements allow you to organize the document content into logical pieces. Use
the sectioning elements to create a broad outline for your page content,
including header and footer navigation,
and heading elements to identify sections of content.
Element |
Description |
<address>
|
Indicates that the enclosed HTML provides contact information for a person or
people, or for an organization.
|
<article>
|
Represents a self-contained composition in a document, page, application, or site,
which
is intended to be
independently distributable or reusable (e.g., in syndication). Examples include a
forum
post, a magazine or
newspaper article, a blog entry, a product card, a user-submitted comment, an
interactive widget or gadget, or any
other independent item of content.
|
<aside>
|
Represents a portion of a document whose content is only indirectly related to the
document's main content. Asides
are frequently presented as sidebars or call-out boxes.
|
<footer>
|
Represents a footer for its nearest ancestor sectioning content or sectioning root
element. A <footer> typically
contains information about the author of the section, copyright data, or links to
related documents.
|
<header>
|
Represents introductory content, typically a group of introductory or navigational
aids.
It may contain some heading
elements but also a logo, a search form, an author name, and other elements.
|
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
|
Represent six levels of section headings. <h1> is the highest section level
and
<h6> is
the lowest.
|
<hgroup>
|
Represents a heading grouped with any secondary content, such as subheadings, an
alternative title, or a tagline.
|
<main>
|
Represents the dominant content of the body of a document. The main content area
consists of content that is
directly related to or expands upon the central topic of a document, or the central
functionality of an application.
|
<nav>
|
Represents a section of a page whose purpose is to provide navigation links, either
within the current document or
to other documents. Common examples of navigation sections are menus, tables of
contents, and indexes.
|
<section>
|
Represents a generic standalone section of a document, which doesn't have a more
specific semantic element to
represent it. Sections should always have a heading, with very few exceptions.
|
<search>
|
Represents a part that contains a set of form controls or other content related to
performing a search or filtering
operation.
|
Table Content
The elements here are used to create and handle tabular data.
Element |
Description |
<caption>
|
Specifies the caption (or title) of a table.
|
<col>
|
Defines a column within a table and is used for defining common semantics on all
common cells. It is generally found
within a <colgroup> element.
|
<colgroup>
|
Defines a group of columns within a table.
|
<table>
|
Represents tabular data — that is, information presented in a two-dimensional table
comprised of rows and columns of
cells containing data.
|
<tbody>
|
Encapsulates a set of table rows (
<tr> elements), indicating that they comprise the body of the table
(<table>).
|
<td>
|
Defines a cell of a table that contains data. It participates in the table model.
|
<tfoot>
|
Defines a set of rows summarizing the columns of the table.
|
<th>
|
Defines a cell as a header of a group of table cells. The exact nature of this group
is defined by the scope and
headers attributes.
|
<thead>
|
Defines a set of rows defining the head of the columns of the table.
|
<tr>
|
Defines a row of cells in a table. The row's cells can then be established using a
mix of
<td> (data cell) and
<th> (header cell) elements.
|