Learn Basic HTML Tags with Examples

By | March 30, 2014

Learn-HTML-tagsHTML is a hyper text mark up language which is used to create web pages. Mostly HTML is used to display the basic structure of a website on the web browser. This is very basic language for web designing. All other web languages are embedded into HTML; You can say HTML is the back bone of web programming. Today we will talk about some basic tags of HTML. The very basic tags we will discuss during this tutorial and also we will come to know the basic structure of a web page that is codded within HTML alone. Now a days the latest version of HTML is HTML5 which is also called XHTML. So we will later on learn the advance HTML.

HTML works in tags, and tags come in pairs. So every tag has two parts; when we insert an HTML tag inside a website or webpage, we must start it first and after writing some text or content we close that tag. The tag structure is like this example:

<html> Content or text here</html>

In the above example you can see the two HTML tags and content within tags. So this is a very basic structure. Also if you noticed that the HTML starting tag is in capital letters and the closing is in small caps. So it doesn’t matter; whether you write the tags in capital or in small, they work fine. HTML tags are not case sensitive like other languages i.e JavaScript and PHP.

HTML Basic Tags with Examples:

Now lets put some content and tags and make a complete HTML page. See below example where I would insert the basic tags inside an HTML page and will explain letter.

<– from here the whole HTML page is started –>
<title>This is my first page</title>
<body bgcolor=”green”>
<h1> Welcome friend to my site!</h1>
<h2>This is my first website</h2>
<p style=”color:red”>I’m a web designer from Lahore, Pakistan. I’ve been blogging for last couple of years. I am very interested to further learn web designing. </p>
<– The HTML whole page is ended here –>

HTML codes are written simply in text editors like Notepad and Notepad++. However, you can also write them in Dreamweaver etc. So in the above example we just created a simple web page only by using HTML. The structure is very basic and if you copy this code and paste it inside a new notepad file and save it with its extension HTML, it will display the same result as instructed in tags. See example image below for above tags:


Some other HTML Tags:

<b> for bold text</b>
<i> for italic text</i>
<u>for underlining</u>
<big>for big text</big>
<strong>for strong text</strong>
<center>for center align a text or element</center>
<div> for a division </div>

Remember: Without giving the extension of HTML, the webpage may not be saved properly. So make sure while saving the file give it a name whatever you like, after the name just write the extension like this .html or .htm. Example is this: mypage.html

How was it?

I hope you learnt a little bit about HTML, while I have planned to publish video tutorials and text tutorials about HTML in coming days. So be with us.

Speak Your Mind