What is HTML ?
HTML 5 was released in public-facing type on 22 January 2008, using a major upgrade and”W3C Recommendation” status in October 2014. Its aims were to enhance the speech with support for the most recent multimedia and other new attributes; to maintain the language both readily readable by people and always recognized by computers and devices like internet browsers, parsers, etc..
without XHTML’s rigidity; and also to stay backward-compatible with old software. HTML 5 is meant to subsume not just HTML 4, but in addition XHTML 1 and DOM Level 2 HTML.
|3.2||W3C: HTML 3.2 Speciﬁcation||1997-01-14|
|4.0||W3C: HTML 4.0 Speciﬁcation||1998-04-24|
|4.01||W3C: HTML 4.01 Speciﬁcation||1999-12-24|
|5||WHATWG: HTML Living Standard||2014-10-28|
|5.1||W3C: HTML 5.1 Speciﬁcation||2016-11-01|
Section 1.1: Hello World
HTML (Hypertext Markup Language) uses a markup system composed of elements which represent speciﬁc content. Markup means that with HTML you declare what is presented to a viewer, not how it is presented. Visual representations are deﬁned by Cascading Style Sheets (CSS) and realized by browsers. Still existing elements that allow for such, like e.g. font, “are entirely obsolete, and must not be used by authors”
HTML is sometimes called a programming language but it has no logic, so is a markuplanguage. HTML tags provide semantic meaning and machine-readability to the content in the page.
An element usually consists of an opening tag (<element_name>), a closing tag (</element_name>), which contain the element’s name surrounded by angle brackets, and the content in between:
There are some HTML elements that don’t have a closing tag or any contents. These are called void elements. Void elements include <img>, <meta>, <link>and <input>.
Element names can be thought of as descriptive keywords for the content they contain, such as video, audio, table, footer.
A HTML page may consist of potentially hundreds of elements which are then read by a web browser, interpreted and rendered into human readable or audible content on the screen.
For this document it is important to note the diﬀerence between elements and tags:
Elements: video, audio, table, footer
Tags: <video>, <audio>, <table>, <footer>, </html>, </body>
Let’s break down a tag…
The <p>tag represents a common paragraph.’
Elements commonly have an opening tag and a closing tag. The opening tag contains the element’s name in angle brackets (<p>). The closing tag is identical to the opening tag with the addition of a forward slash (/) between the opening bracket and the element’s name (</p>).
Content can then go between these two tags: <p>This is a simple paragraph.</p>.
Creating a simple page
The following HTML example creates a simple “Hello World” web page.
HTML ﬁles can be created using any text editor. The ﬁles must be saved with a .html or .htm extension in order to be recognized as HTML ﬁles.
Once created, this ﬁle can be opened in any web browser.
Simple page break down
These are the tags used in the example:
|<!DOCTYPE>||Deﬁnes the HTML version used in the document. In this case it is HTML5.
See the doctypes topic for more information.
|<html>||Opens the page. No markup should come after the closing tag (</html>).
The lang attribute declares the primary language of the page using the ISO language codes (en for English)
See the Content Language topic for more information.
|<head>||Opens the head section, which does not appear in the main browser window but mainly contains information about the HTML document, called metadata. It can also contain imports from external stylesheets and scripts. The closing tag is </head>.|
|<meta>||Gives the browser some metadata about the document. The charset attribute declares the character encoding. Modern HTML documents should always use UTF-8, even though it is not a requirement. In HTML, the <meta> tag does not require a closing tag.
See the Meta topic for more information.
|<title>||The title of the page. Text written between this opening and the closing tag (</title>) will be displayed on the tab of the page or in the title bar of the browser.|
|<body>||Opens the part of the document displayed to users, i.e. all the visible or audible content of a page. No content should be added after the closing tag </body>.|
|<h1>||A level 1 heading for the page.
See headings for more information.