HTML Introduction

HTML Introduction

Sponsored Ads

As told earlier HTML stands for Hyper Text Markup Language. Markup Language means html marks up the text document to tell a web browser how it should display it.

Sponsored Ads

An html file is a simple text file with an extension of “.htm” or “.html”. An html file can be created by using any text editor like notepad, notepad++ etc. There are also advanced html editors.

Basic HTML Documents

In its simple form an html document can be written like this

<!DOCTYPE html>
<html>
<head>
<title>Title of the page goes here...</title>
</head>
<body>
<h1>My First HTML Document. This is a Heading</h1>
<p>This is a paragraph</p>
</body>
</html>

Example Explained

In the above example anything that is between the angle bracket (less than and greater than sign) is known as an html tag. Inside the <html> we have the <head>….</head> and <body>….</body> element.

<!DOCTYPE html>: declaration defines what type and version of document. Here it is HTML5 the latest version of HTML.

<html>: The html documents starts with a <html>tag. The entire html document is written between the <html>…</html> tags.

<head>: element contains meta information about the document, link to the supporting css and javascript files and all. Anything written inside <head> element is not displayed by the browsers.

<title>: Title element always used inside <head> element is used to specify a title for the document.

<body>: This element is where the actual content is written. The web browsers only displays content inside the <body>…</body> element. All displayable content is written here enclosed in other tags which we learn soon. 

<h1>: This tag is used to specify a heading and the first heading.

Sponsored Ads

<p>:This tag specifies a paragraph

HTML Page Structure

You can see a picturisation of an HTML page structure:

HTML Versions

Since the early days of the web, there have been many versions of HTML

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to understand which version of HTML is used in the page and display web pages correctly.

It must only appear once, at the top of the page (before any HTML tags).

The <!DOCTYPE> declaration is not case sensitive.

The <!DOCTYPE> declaration for HTML5 is: <!DOCTYPE html>

Web Browsers

A web browser (commonly referred to as a browser) is a software application used to display webpages i.e. html pages.

Sponsored Ads

The browser does not display the HTML tags, but uses these tags to determine how to arrange and display the content of the document correctly. Some Examples of web browsers are Google chrome, Mozilla Firefox, Apple Safari, Microsoft Edge or Internet Explorer etc.

Sponsored Ads

%d bloggers like this: