HTML, or HyperText Markup Language, serves as the fundamental building block of web development, providing a standardized structure for creating and organizing content on the World Wide Web. This language, essential for constructing web pages, encompasses a set of elements denoted by tags that define the various components within a document. As a declarative markup language, HTML focuses on structuring content rather than specifying how it should be presented or styled.
The core structure of an HTML document typically includes a document type declaration (), an opening
tag, and two main sections: the
and the
. The
section comprises metadata, such as the document title, character set, linked stylesheets, and scripts, while the
section encapsulates the actual content visible to users.
Tags in HTML are enclosed in angle brackets (<>
) and come in pairs – an opening tag and a closing tag. The content is placed between these tags. For instance, a basic paragraph is denoted by the
tag, with the actual text placed between the opening and closing tags.
Attributes, which provide additional information about HTML elements, are embedded within the opening tag and are typically in name/value pairs. These attributes modify the behavior or appearance of the element. For instance, the tag, representing hyperlinks, includes the
href
attribute to specify the URL of the linked resource.
HTML supports a variety of elements catering to diverse content types. Headings are marked with
to
, where
represents the highest level and
the lowest. Lists, both ordered (
) and unordered (
), structure content in a hierarchical manner using
for list items.
Tables in HTML are created with the
, respectively. The
|