HTML Introduction

HTML Introduction

Introduction

HTML is a web page designing language that stands for Hyper Text Markup Language. This language was released firstly in 1993 by WHATWG. The file extension of the files for this language is “.htm” or “.html”. In this article we will give an introduction of HTML and the meaning of the tags used in this language.

What is HTML

HTML is a Markup language that is used to define the structure of your content on a website with the help of a browser.

A Markup language is a computer language which uses tags to define elements in a document. These elements can be a paragraph, image, bullet points, tables or anything that you see daily in your word or paper documents.

Tags of HTML

The tags that encloses a word can change the way it behaves. It can be easily understood from the examples below:

Case 1:

Here, we have just used <p> tags (paragraph tags) as shown below in our code:

p tags

When we run this code on browser, we get given output:

p tag output

Note: Try these examples by your own. Open the index.html file we have created earlier in notepad++ and test it by opening the same in a browser.

Case 2:

Here, we have used <a> tags (anchor tags) as shown below in our code:

a tags

When we run this code on browser, we get given output:

a tag output

In the above screen, the term “Google” is a link which redirects to http://www.google.com on click.

Case 3:

Here, we have used <h1> tags (Heading 1 tag) as shown below in our code:

h1 tags

When we run this code on browser, we get given output:

h1 tag output

From above examples, we can derive that a HTML tag includes the following:

html tags Introduction

  1. The opening tag: This tag consists of a tag name enclosed between angle brackets <> and marks the opening of a tag i.e. from where the effect of the tag will start.
  2. The closing tag: Just like the opening tag, this tag also consists of a tag name but preceded by a forward slash “/”, all enclosed between angle brackets <>. This marks the closing of a tag i.e. from where the effect of the tag will end.
  3. The content: This is the content that is actually visible on the browser
  4. The element: The opening tag, the content and the closing tag together make an element.

Example of modern HTML Code

<!DOCTYPE html>
<html>
    <head>
        <title>Hello World Website</title>
        <script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js">
        </script>
    </head>
    <body>
    <H2> Hello World! </H2>
    </body>
</html>

 

TagMeaning
<!DOCTYPE html>It tells the version of the HTML
<html>It represent the start and end of the HTML Codes
<head>It is the head part of html mainly used to load metatags, Title, favicon, scripts and css.
<title>It is used to show title of website
<script>It is used to load APIs and scripts
<body>All the visible content of a webpage is added within it

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.