HTML Elements and Tags


As you’ve come to know that what HTML is. Now let’s move to understand the marks used in HTML and how web browsers use them to format such beautiful webpages. As I’ve mentioned earlier in my blog What Is HTMLthat marks are symbols which play a vital rule to display a well formatted and well organized webpage. In the web development term these marks are known as HTML tags. 
These marks are called Tags. Tags, in HTML, are normally of two types — starting tags and ending tags. Starting Tag is started with a left angle bracket, then contains some text, such as html, body, title, i, b, img, indicating the type of formatting and ends with a right angle bracket. Ending Tag is started with a left angle bracket preceded by a forward slash and
some letters and ends with a right angle bracket. The pair of the both starting tag and ending tag is known as an HTML Element. These tags are used to perform many formatting tasks such as inserting objects, formatting text, linking to other webpages, dividing a webpage area into many portions, providing information to the Search Engines.

Example of Bold Element

Here is an example of an HTML Bold Text Element:
Hello! I’m testing the Bold Text Element of HTML!
In the above example  is the starting tagand  is the ending tagof the HTML Bold Text Element. “Hello! I’m testing the Bold Text Element of HTML!” is the phrase which will be displayed, as bold formatted, in the web browserswindows as output. This is how the output would be.
When you will see it in web browser it will look like the following:

fig.1. The result of Bold Element of HTML


Example of Bold And Italic Element

Here is another example of an HTML Italic Element which is a modification of previous example:
Hello! I’m testing the Italic Text Element of HTML!
In the above example  is the starting tagand  is the ending tagof the HTML Italic Text Element. “Hello! I’m testing the Italic Text Element of HTML!” is the phrase which will be displayed, as italic formatted, in the web browsers windows as output. This is how the output would be.
When you will see it in web browser it will look like the following:


fig.2. The result of Italic and Bold Elements of HTML


Example of Heading, Bold And Italic Element

Another example of an HTML Heading Element which is a modification of very previous example:

Hello! I’m testing the Italic Text Element of HTML!

In the above example  is the starting tagand  is the ending tagof the HTML Italic Text Element. “Hello! I’m testing the Italic and bold Text Elements with a heading of HTML Element!” is the phrase which will be displayed, as a heading of the document in the web browsers windows as output. When you will see it in web browser it will look like the following:

fig.3. The result of Bold, Italic and Heading 1 Elements of HTML

One important thing to note is that when you are using multiple tags in a row like in above example you must care about it that the last start tag will get close first.

Leave a Reply

Your email address will not be published. Required fields are marked *