HTML Tags Attributes

HTML Basic Unit is Tag. A tag is keyword of HTML language. Tags are enclosed in these brackets < >.

For example <html> is HTML tag that tells web page that HTML code hast started. In HTML most of the Tags are in pairs, so if a Tag Starts, it ends as well. Starting and Closing Tags have only one difference, that is that Closing Tag has a forward Slash (/).

<html>

HTML Code goes here

</html>

In the above example HTML tag is started using <html> and then the scope of HTML is closed using </html>. This means what ever we type inside these html tags will be treated as HTML.
Another Example of HTML Tags is <BODY>

<body>

all the body tags here

</body>

HTML Attributes

Most of the Tags in HTML have properties, these properties are known as Attributes. Properties are typed inside the starting Tag. Attributes are followed by their values.

To understand Tags, Attributes and Values lets take the example of a car. car has colour, car has price. Think of this car as a Tag and Colour and price as attributes. Let's say colour is Red and price is 3000, now Red and 3000 are values of attributes.

They Syntax for writing HTML Attributes with Tag is

<TagName Attribute="Value" Attribute="Value"> </TagName>

<body bgcolor="red">

</body>

In above example we used a Tag body and the attribute is bgcolor, where the value of attribute is red.