We Educate People

HTML Lecture 3 - Elements, Tags and Attributes

HTML_ELements_Tags_Attributes

Welcome to the Lecture # 3 of HTML in Web Designing.

In previous lecture you learnt about the Doctype decalaration, how to code and save the file.

This lecture will let you know about some other important things of HTML i.e. Elements, Tags and Attributes.

These three are different factors of html but differentiating these three is a bit confusion for a learner.

As a learner you should know about what are html elements, tags and attributes and how to understand them properly.

Lets start our lecture!


Watch=> HTML Lecture 2 - Declaration and First Code


What are HTML Elements, Tags and Attributes?

Elements:

Elements in html are those which you see on a webpage.

For Example: You open a webpage and you see a paragraph to read, so that paragraph is an element.

An element consists of opening and closing tags with the content between them.

The content can be a paragraph, a heading, a bold text, an italic text and so on.

Below is an example of Paragraph elements.

<p> This is a paragraph </p>

Tags:

Tags are also the important factor of html because every element consists of opening and closing tags.

Some elements don't need the both tags because that elements are self closing and they only contain a single self closing tag.

An opening tag must starts with < angle bracket followed by the tag name and then ends with > angle bracket.

An end tag must starts with < angle bracket followed by a / forward slash then tag name and then > angle bracket. / forward slash represents that it is a closing tag and it must be placed before the tag name.

A self closing tag must starts with < angle bracket then tag name then a / forward slash (optional) and then > angle bracket.

An example of opening and closing tags:

<p> This P element is covered with both opening and end tags.</p>

An example of self-closing tag:

<br> or <br />

Attributes:

You can also call it the characteristics of element.

Suppose you have a car, so what are the characteristics of that car? The car color may be blue, car name may be civic and so on.

There could be lots of characteristics of a car and the same in html.

To assign a characteristic on an element you should place an attribute="value" in the opening tag of element, after the tag name and must be followed a space before it.

An Example:

<p title="This is the Title"> This is a Paragraph </p>

So, this was the 3rd lecture of HTML in web designing in which you learnt about Elements, Tags and Attributes.

If this was helpful for you then share this with others to help them in learning the html.

Note: If you are interested in Making Money Online then get connected with us, a post related with Make Money Online will be published soon on this blog.

No comments:

Post a Comment

If you like this post and want to ask something, you can comment your problems and questions. Please do not spam.

About Expertise

Expertise is a visionary platform of success for all. People can educate their selves online with the help of Expertise. The aim of the expertise is to educate people around the globe and make them able to live a comfortable living. Expertise will help people by providing tutorials, guides, helps and fre... Read More