HTML: HYPERTEXT MARKUP LANGUAGE

1. Introduction

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScript).

"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.

HTML uses "markup" to annotate text, images, and other content for display in a Web browser. HTML markup includes special "elements" such as 'head', 'title', 'body', 'header', 'footer', 'article', 'section', 'p', 'div', 'span', 'img', 'aside', 'audio', 'canvas', 'datalist', 'details', 'embed', 'nav', 'output', 'progress', 'video', 'ul', 'ol', 'li' and many others.

2. THE HISTORY OF HTML

HTML was invented by Tim Berners-Lee, a physicist at the CERN research institute in Switzerland. He came up with the idea of an Internet-based hypertext system. Hypertext means a text that contains references (links) to other texts that viewers can access immediately. He published the first version of HTML in 1991, consisting of 18 HTML tags. Since then, each new version of the HTML language came with new tags and attributes (tag modifiers) to the markup. According to Mozilla Developer Network’s HTML Element Reference, currently, there are 140 HTML tags, although some of them are already obsolete (not supported by modern browsers). Due to a quick rise in popularity, HTML is now considered an official web standard. The HTML specifications are maintained and developed by the World Wide Web Consortium (W3C). You can check out the latest state of the language anytime on W3C’s website. The biggest upgrade of the language was the introduction of HTML5 in 2014. It added several new semantic tags to the markup, that reveal the meaning of their own content, such as 'article', 'header', & 'footer'.

3. HTML EVOLUTION, WHAT DIFFERS BETWEEN HTML AND HTML5?

Since the first days, HTML has gone through an incredible evolution. W3C constantly publish new versions and updates, while historical milestones get dedicated names as well. HTML4 (these days commonly referred to as “HTML”) was published in 1999, while the latest major version came out in 2014. Named HTML5, the update has introduced many new features to the language. One of the most anticipated features of HTML5 is native support for audio and video embedding. Instead of using Flash player, we can simply embed videos and audio files to our web pages using the new 'audio' and 'video' tags. It also includes in-built support for scalable vector graphics (SVG) and MathML for mathematical and scientific formulas. HTML5 introduced a few semantic improvements as well. The new semantic tags inform browsers about the meaning of content, which benefits both readers and search engines. The most popular semantic tags are:'article', 'section', 'aside', 'header', and 'footer'.

PROS AND CONS OF HTML

Like most things, HTML comes with a handful of strengths and limitations.
Pros:

Cons:

5. HOW ARE HTML, CSS, AND JAVASCRIPT RELATED?

While HTML is a powerful language, it isn’t enough to build a professional and fully responsive website. We can only use it to add text elements and create the structure of the content. However, HTML works extremely well with two other frontend languages: CSS (Cascading Style Sheets), and JavaScript. Together, they can achieve rich user experience and implement advanced functions.

6. SO...WHAT IS HTML?

HTML is the main markup language of the web. It runs natively in every browser and is maintained by the World Wide Web Consortium. You can use it to create the content structure of websites and web applications. It’s the lowest level of frontend technologies, that serves as the basis for styling you can add with CSS and functionality you can implement using JavaScript.

7. HOW DOES HTML WORK?

HTML documents are files that end with a .html or .htm extension. You can view then using any web browser (such as Google Chrome, Safari, or Mozilla Firefox). The browser reads the HTML file and renders its content so that internet users can view it. Usually, the average website includes several different HTML pages. For instance: home pages, about pages, contact pages would all have separate HTML documents. Each HTML page consists of a set of tags (also called elements), which you can refer to as the building blocks of web pages. They create a hierarchy that structures the content into sections, paragraphs, headings, and other content blocks. Most HTML elements have an opening and a closing that use the 'tag' syntax. Below, you can see a code example of how HTML elements can be structured:


 <div>
<h1>The Main Heading</h1>
<h2>A catchy subheading</h2>
<p>Paragraph one</p>
<img src="/" alt="Image">
<p>Paragraph two with a <a href="https://example.com">hyperlink</a></p>
</div>

  

8. HTML TAG TYPE

HTML tags have two main types: block-level and inline tags.

  1. Block-level elements take up the full available space and always start a new line in the document. Headings and paragraphs are a great example of block tags.
  2. Inline elements only take up as much space as they need and don’t start a new line on the page. They usually serve to format the inner contents of block-level elements. Links and emphasized strings are good examples of inline tags.

8.1 BLOCK-LEVEL TAGS

The three block level tags every HTML document needs to contain are 'html', 'head', and 'body'

  1. The 'html' tag is the highest level element that encloses every HTML page.
  2. The 'head' tag holds meta information such as the page’s title and charset.
  3. Finally, the 'body' tag encloses all the content that appears on the page.
  
  <html>
<head>
<!-- META INFORMATION -->
</head>
<body>
<!-- PAGE CONTENT -->
</body>
</html>

  

8.2 Inline Tags

Many inline tags are used to format text. For example, a 'strong' tag would render an element in bold, whereas 'em' tags would show it in italics.
Hyperlinks are also inline elements that require tags and href attributes to indicate the link’s destination:

<a href="https://example.com/">Click me!</a> Images are inline elements too. You can add one using 'img' without any closing tag. But you will also need to use the src attribute to specify the image path, for example: <img src="/images/example.jpg" alt="Example image">