HTML stands for Hypertext Markup Language. The browser uses it to structure content on a web page. HTML also describes the basic layout of a web page.
What is HyperText?
HyperTexts are texts that link a page to another page on the same website or another site. By default, links are underlined and have blue text color.
HTML is a Markup Language
HTML is not a programming language but a markup language. HTML uses tags as markup to annotate different types of content in a web page. For example, HTML has the <img>
tag for an image, and for a paragraph, it has a <p>
tag.
<p> I am a paragraph</p>
<img src="/media/codingvarsity-logo.jpg" alt="coding varsity logo" />
HTML Tags
HTML Tags give special meaning (semantics) to the text they enclose.
<h1>
I am the most significant heading
</h1>
<p>
I am a paragraph
</p>
<html>
I contain whole HTML Document
</html>
All HTML Tags are case insensitive. You can write them as you like
<TITLE>
or<title>
or even<Title>
. All versions are correct.
HTML Document
Let’s go through a simple HTML document and learn about few tags that we can use to create a web page.
<!DOCTYPE html>
<html>
<head>
<title>I am a title</title>
</head>
<body>
<h1>I am a heading</h1>
<p>I am a paragraph</p>
<img src=”/media/codingvarsity.jpg” alt=”codingvarsity logo”/>
</body>
</html>
<!DOCTYPE html>
<!DOCTYPE html>
is the required preamble in all HTML documents. Its purpose is to tell the browser to render the document in the latest version of HTML.
<html>
<html>
tag is the container for all HTML elements and is the root of an HTML document.
<head>
<head>
tag contains meta-information about the web page. These pieces of information are not displayed on the screen but are used by the browsers and search engines to understand the content of the document.
<title>
<title>
tag is used to add the title of the document.
<body>
<body>
tag contains the main content of the document and is displayed in the browser window.
<h1>
<h1>
tag is used to add the most significant heading in the document. A web page should contain only one <h1>
tag.
<p>
<p>
tag is used to add a paragraph in the document.
<img>
<img>
tag is used to embed an image in the document.
We will learn about every tag in more detail in another article.
Summary
- HTML stands for HyperText Markup Language.
- Hypertexts are texts that one web page to another web page.
- HTML tags give special meaning to the text they enclose. For example, to create a paragraph we use the
<p>
tag. - All HTML tags are case insensitive.
-
<!DOCTYPE html>
is required in all HTML documents to instruct the browser to render the document in the latest version of HTML.
Top comments (1)
HTML was invented 1993 by Tim Berners-Lee, who worked as a physicist at the CERN. He was looking for a possiblity to present Text over the internet. The guys these days where using text monitors with 80 x 25 green letters on a black ground, so HTML just reflects what was possible these days: No advanced formatting, no colors.
We are still using HTML because Web designers love traditions. The last 25 years people spent a lot of effort to overcome the shortcomings of this standard, but at it´s core HTML is still a tool of the stone age.