HTML – Hypertext Markup Language
Web browsers receive HTML documents from a web server or from local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and other objects such as interactive forms may be embedded into the rendered page. HTML provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written using angle brackets. Tags such as
<img /> and
<input /> directly introduce content into the page. Other tags such as
<p> surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags, but use them to interpret the content of the page.
|Internet media type||
|Developed by||W3C & WHATWG|
5.2/ 5.3 (working draft)
(14 December 2017 )
|Type of format||Document file format|
In 1980, physicist Tim Berners-Lee, a contractor at CERN, proposed and prototyped ENQUIRE, a system for CERN researchers to use and share documents. In 1989, Berners-Lee wrote a memo proposing an Internet-based hypertext system. Berners-Lee specified HTML and wrote the browser and server software in late 1990. That year, Berners-Lee and CERN data systems engineer Robert Cailliau collaborated on a joint request for funding, but the project was not formally adopted by CERN. In his personal notes from 1990, he listed “some of the many areas in which hypertext is used” and put an encyclopedia first.
The first publicly available description of HTML was a document called “HTML Tags”, first mentioned on the Internet by Tim Berners-Lee in late 1991. It describes 18 elements comprising the initial, relatively simple design of HTML. Except for the hyperlink tag, these were strongly influenced by SGMLguid, an in-house Standard Generalized Markup Language (SGML)-based documentation format at CERN. Eleven of these elements still exist in HTML 4.
HTML is a markup language that web browsers use to interpret and compose text, images, and other material into visual or audible web pages. Default characteristics for every item of HTML markup are defined in the browser, and these characteristics can be altered or enhanced by the web page designer’s additional use of CSS. Many of the text elements are found in the 1988 ISO technical report TR 9537 Techniques for using SGML, which in turn covers the features of early text formatting languages such as that used by the RUNOFF command developed in the early 1960s for the CTSS (Compatible Time-Sharing System) operating system: these formatting commands were derived from the commands used by typesetters to manually format documents. However, the SGML concept of generalized markup is based on elements (nested annotated ranges with attributes) rather than merely print effects, with also the separation of structure and markup; HTML has been progressively moved in this direction with CSS.
Berners-Lee considered HTML to be an application of SGML. It was formally defined as such by the Internet Engineering Task Force (IETF) with the mid-1993 publication of the first proposal for an HTML specification, the “Hypertext Markup Language (HTML)” Internet Draft by Berners-Lee and Dan Connolly, which included an SGML Document type definition to define the grammar. The draft expired after six months, but was notable for its acknowledgment of the NCSA Mosaic browser’s custom tag for embedding in-line images, reflecting the IETF’s philosophy of basing standards on successful prototypes. Similarly, Dave Raggett’s competing Internet-Draft, “HTML+ (Hypertext Markup Format)”, from late 1993, suggested standardizing already-implemented features like tables and fill-out forms.
After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group, which in 1995 completed “HTML 2.0”, the first HTML specification intended to be treated as a standard against which future implementations should be based.
Further development under the auspices of the IETF was stalled by competing interests. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the World Wide Web Consortium (W3C). However, in 2000, HTML also became an international standard (ISO/IEC 15445:2000). HTML 4.01 was published in late 1999, with further errata published through 2001. In 2004, development began on HTML5 in the Web Hypertext Application Technology Working Group (WHATWG), which became a joint deliverable with the W3C in 2008, and completed and standardized on 28 October 2014.
HTML markup consists of several key components, including those called tags (and their attributes), character-based data types, character references and entity references. HTML tags most commonly come in pairs like
</h1>, although some represent empty elements and so are unpaired, for example
<img>. The first tag in such a pair is the start tag, and the second is the end tag (they are also called opening tags and closing tags).
Another important component is the HTML document type declaration, which triggers standards mode rendering.
The following is an example of the classic “Hello, World!” program:
<!DOCTYPE html> <html> <head> <title>This is a title</title> </head> <body> <p>Hello world!</p> </body> </html>
The text between
</html> describes the web page, and the text between
</body> is the visible page content. The markup text
<title>This is a title</title> defines the browser page title.
The Document Type Declaration
<!DOCTYPE html> is for HTML5. If a declaration is not included, various browsers will revert to “quirks mode” for rendering.
In the simple, general case, the extent of an element is indicated by a pair of tags: a “start tag”
<p> and “end tag”
</p>. The text content of the element, if any, is placed between these tags.
Tags may also enclose further tag markup between the start and end, including a mixture of tags and text. This indicates further (nested) elements, as children of the parent element.
The start tag may also include attributes within the tag. These indicate other information, such as identifiers for sections within the document, identifiers used to bind style information to the presentation of the document, and for some tags such as the
<img> used to embed images, the reference to the image resource.
Some elements, such as the line break
<br>, do not permit any embedded content, either text or further tags. These require only a single empty tag (akin to a start tag) and do not use an end tag.
Many tags, particularly the closing end tag for the very commonly used paragraph element
<p>, are optional. An HTML browser or other agent can infer the closure for the end of an element from the context and the structural rules defined by the HTML standard. These rules are complex and not widely understood by most HTML coders.
The general form of an HTML element is therefore:
<tag attribute1="value1" attribute2="value2">''content''</tag>. Some HTML elements are defined as empty elements and take the form
<tag attribute1="value1" attribute2="value2">. Empty elements may enclose no content, for instance, the
<br> tag or the inline
<img> tag. The name of an HTML element is the name used in the tags. Note that the end tag’s name is preceded by a slash character,
/, and that in empty elements the end tag is neither required nor allowed. If attributes are not mentioned, default values are used in each case.
Header of the HTML document:
<head>...</head>. The title is included in the head, for example:
<head> <title>The Title</title> </head>
Headings: HTML headings are defined with the
<h1>Heading level 1</h1> <h2>Heading level 2</h2> <h3>Heading level 3</h3> <h4>Heading level 4</h4> <h5>Heading level 5</h5> <h6>Heading level 6</h6>
<p>Paragraph 1</p> <p>Paragraph 2</p>
<br>. The difference between
<p> is that
br breaks a line without altering the semantic structure of the page, whereas
p sections the page into paragraphs. Note also that
br is an empty element in that, although it may have attributes, it can take no content and it may not have an end tag.
<p>This <br> is a paragraph <br> with <br> line breaks</p>
This is a link in HTML. To create a link the
<a> tag is used. The
href attribute holds the URL address of the link.
<a href="https://www.wikipedia.org/">A link to Wikipedia!</a>
There are many possible ways a user can give input/s like:
1 <input type="text" /> <!-- This is for text input --> 2 <input type="file" /> <!-- This is for uploading files --> 3 <input type="checkbox" /> <!-- This is for checkboxes -->
<!-- This is a comment -->
Comments can help in the understanding of the markup and do not display in the webpage.