HTML

HTML (HyperText Markup Language) is a standard markup language for web documents designed to be displayed in a web browser. HTML itself is static, and could be enhanced with Cascading Style Sheets to add design properties to the markup, and JavaScript to add functionality such as dynamic content.
== Markup ==
=== Example ===
A basic HTML document must begin with a !DOCTYPE declaration, although newer browsers could still parse documents without the declaration, old Internet Explorer versions use a much more complicated !DOCTYPE declarations because they must include a Document Type Definition.HTML doctype declaration W3Schools - Retrieved Eighth of July, 2021
After the declaration of the document, a <html> tag must be present. Although like before, browsers could display the website normally, an inconsistency may produce an error to some format-sensitive softwares such as screen readers and older browsers.
A <head> meta element must be included to instruct the browser how to load the page. In the head element, sub-elements must be included as well.HTML head Elements W3Schools - Retrieved Eighth of July, 2021
This includes the elements:
* <meta>, controls preliminary data and identification that the browser loads for the first time. Data includes the webpage author, semantic data, license, and others. Self closing tag.HTML meta tag W3Schools - Retrieved Eighth of July, 2021 Search engine crawlers makes first impressions based on the meta tags, and as such, formatting and filling out these tags is a recommended SEO practice.
* <title>, controls the title of the document, but not the name of the file.HTML title tag W3Schools - Retrieved Eighth of July, 2021
* <style>, controls local in document styles, any CSS code in the this element would be parsed. It is recommended to use outsourced stylesheets due to how the browser parses styles.HTML style tag W3Schools - Retrieved Eighth of July, 2021
* <link>, controls how the browser would fetch external resources, most commonly used to fetch CSS document. Unfortunately, JavaScript cannot be fetched using this method.HTML link tag W3Schools - Retrieved Eighth of July, 2021
* <script>, like the <style> tag, this element executes any JavaScript code inside it, could also be used to fetch external JavaScript documents, although the resource that is fetched could be dangerous or malicious without proper HTTPS encryption, security protocols, integrity checks and basic code scanning: <script referrerpolicy="origin" src="resources/code.js">.HTML script tag W3Schools - Retrieved Eighth of July, 2021
* <base>, controls the root base link. If the browser recognizes a base link, the document doesn't need to use the whole path to refer to root assets.HTML base tag W3Schools - Retrieved Eighth of July, 2021
After the <head> element, the <body> element is introduced to the document, the <body> tag wraps around all the contents of the viewable part of the document.HTML body tag W3Schools - Retrieved Eighth of July, 2021
The (paragraph) tag denotes a part of the text that is considered a paragraph, the element would expand and contract itself assuming how large and small it's contents is, although this could be restricted by wrapping it in a fixed width-height element.
HTML markup normally is case insensitive and ignores whitespaces, but everything inside the element and its attributes is case sensitive.
<!DOCTYPE html>
<html>
 <head>
 <meta name="description" content="My first website!">
 <meta name="author" content="Myself">
 <title>A webpage :)</title>
 </head>
<body>
 Hello world!
</body>
</html>
==== Difference between markup language and programming language ====
HTML is a markup language, not a programming language. The difference is what markup language is, and what programming language is. A markup language tells the software how to display and react to it, whilst a programming language tells the program what to do.
=== Semantic tags and ARIA ===
In recent years of development of the HTML5 Living Standard, Semantic HTML has become one of the recommended features of web development, semantic HTML tags are used to give meaning to a part of the markup, for example:
 
 <img src="/res/logo.svg" width="100px" />
 
 
 <a href="/">Home</a>
 <a href="products">Products</a>
 <a href="about">About us</a>
 
The code above may be meaningful to the developer, but to screen readers and other assistive programs, it may just be another decorational piece of code to the website. Semantic tags have metadata already implemented in them, so the developer may use these tags to give meaning to assistive programs and even search engine crawler bots:
<header>
 
 <img src="/res/logo.svg" width="100px" alt="Our logo" />
 
 <nav>
 
 <a href="/" title="Go to homepage">Home</a>
 <a href="products" title="Go to the products page">Products</a>
 <a href="about" title="Learn more about us">About us</a>
 
 </nav>
</header>
The snippet above is much more meaningful both to the developer, and assistive softwares. It also reduces the need to scope id selectors to elements as the semantic tags are unique by themselves and can be specifically targeted by both CSS and JavaScript. Most of the non semantic elements in the snippet have been added common accessibility components (alt for supplying alternate text or description for the interactive element) or ARIA attributes.
WAI-ARIA is a set of attributes that define ways to make web content and web applications (especially those developed with JavaScript) more accessible to people with disabilities.ARIA MDN Web Docs - Revision Nov 10, 2021, by MDN contributorsAnd since HTML5, all ARIA attributes, roles and states are now valid, although it is highly recommended to use widely supported ARIA features rather than making custom ones.
== Versions and History ==
=== HTML version timeline ===
==== HTML 2 ====
:; November 24, 1995: HTML 2.0 was published as IETF RFC. Here are four supplemental RFCs for additional capabilities:
::* November 25, 1995: RFC 1867 (form-based file upload)
::* May 1996: RFC 1942 (tables)
::* August 1996: RFC 1980 (client-side image maps)
::* January 1997: RFC 2070 (Internationalization of HTML)
==== HTML 3 ====
:; January 14, 1997: HTML 3.2 was published as a W3C Recommendation. It was the first version developed and standardized exclusively by the W3C, as the IETF had closed its HTML Working Group on September 12, 1996.
:: HTML was initially code-named "Wilbur", HTML 3.2 dropped math formulas entirely, reconciled overlap among various proprietary extensions and adopted most of Netscape's visual markup tags. 
:: Netscape's blink element and Microsoft's marquee element were omitted due to a mutual agreement between the two companies.
==== HTML 4 ====
:; December 18, 1997 : HTML 4.0 was published as a W3C Recommendation. It offers three variations:
:;* : Strict, in which deprecated elements are forbidden
:;* Transitional, in which deprecated elements are allowed
:;* Frameset, in which mostly only frame related elements are allowed.
:: HTML 4.0 was initially code-named "Cougar", HTML 4.0 adopted many element types and attributes that are compactible with web browsers, but also sought to phase out Netscape's visual markup features by marking them as deprecated in favor of style sheets, especially CSS. HTML 4 is an SGML application conforming to ISO 8879 – SGML.
:; April 24, 1998 : HTML 4.0 was re-issued with minor edits without incrementing the version number.
:; December 24, 1999 : HTML 4.01 was published as a W3C Recommendation. It offers the same three variations as HTML 4.0 and its last errata ("HTML 4 Errata") were published on May 12, 2001.
:; May 2000 : ISO/IEC 15445:2000 ("ISO HTML", based on HTML 4.01 Strict) was published as an ISO/IEC international standard. 
:: After HTML 4.01, there were no new versions of HTML for many years, as the development of the parallel, XML-based language XHTML occupied the W3C's HTML Working Group.
==== HTML 5 ====
: Main article: HTML5
:; October 28, 2014 : HTML5 was published as a W3C Recommendation.
:; November 1, 2016 : HTML 5.1 was published as a W3C Recommendation.
:; December 14, 2017 : HTML 5.2 was published as a W3C Recommendation.
=== Transition of HTML publication to WHATWG ===
On May 28, 2019, the W3C, after announcing its retirement, announced that WHATWG would be the new sole publisher of the HTML and DOM standards, replacing W3C to continue development. The W3C and WHATWG had been publishing competing standards since 2012. While the W3C standard was identical to the WHATWG, the standards have since progressively diverged due to different design decisions. The WHATWG "Living Standard" had been the de facto web standard for some time, which means it is practically operated but not officially featured.
== References ==
:Note: Click "Expand" on the right side of the page to show references
Category:Markup languages
Category:Featured articles