Tags, Attributes and Elements

HTML Tags:

 

HTML markup tags are usually called HTML tags.

 

  1. HTML tags are keywords (tag names) surrounded by angle brackets like <html>
  2. HTML tags normally come in pairs like <p> and </p>
  3. The first tag in a pair is the start tag, the second tag is the end tag
  4. The end tag is written like the start tag, with a slash before the tag name
  5. Start and end tags are also called opening tags and closing tags

 

Syntax : <tag name> Content </tag name>

 

Html Attributes:

 

  1. Attributes provide additional information about HTML elements.
  2. HTML elements can have attributes
  3. Attributes provide additional information about an element
  4. Attributes are always specified in the start tag
  5. Attributes come in name/value pairs like: name="value"

 

Example:

 

HTML links are defined with the <a> tag. The link address is specified in the href attribute: <a href="d:\html\images.html">This is a link</a>

 

Html Elements :

 

HTML documents are defined by HTML elements. Elements are the bits that make up web pages. An HTML element is everything from the start tag to the end tag. The start tag is often called the opening tag. The end tag is often called the closing tag.

 

Syntax
<opening tag> element content <closing tag>

 

Example
“<title>” and “</title>” are tags,
“<title>HTML</title>” is a title element.

 

 

Start tag Element content End tag
<p> This is a paragraph </p>
<a href="default.htm"> This is a link </a>
<br>

 

 

 

 

 

 

 

 

 

hYPER TEXT MARKUP LANGUAGE by DEEPA & SURIYA