TAGS & ATTRIBUTESHTML Tags :HTML tags are like keywords which define thathow web browser will format and display the content. HTML tags contain three main parts:
Syntax : < tag > Content < /tag > Types of Tags :There are two types of tags present in HTML. They are
An HTML tag which consists of an opening tag and a closing tag is called as Paired Tags. The first tag can be referred to as the ‘Opening Tag’, and the second tag can be called Closing Tag. They are also called as Container Tags. 2. Unpaired Tags (Self-closing Tags / Empty Tags / Void Tags(Void Elements)) : An HTML tag which only has an opening tag and does not have a closing tag is called as Unpaired Tag. The Unpaired HTML tag does not require a closing tag; an opening tag is sufficient in this type. They are also called as Self-Closing Tags, Empty Tags, Void Elements / Tags. HTML Elements :An HTML element is a collection of start tag, attributes, end tag, content between them. The element usually starts with an opening tag which consists the name of the element and it indicates where the element begins. The closing tag includes a forward slash before the element's name. Everything inside the opening and closing tags is the content. ![]() Basic structure of an HTML Document : You can see the basic structure of HTML in above heading(Example of Simple HTML document). HTML Attributes : Elements also have attributes, whichprovides additional information about elements thatwill not appear in the content. Attributes are always specified in the start tag. Syntax : < element attribute_name="attribute_value" > ![]() Characteristics of Attributes : There is a space between attributes and the element name « Previous Next Topic » (WebTech - Basic Tags,Formatting Tags & Anchor Tag ) |