Anatomy of an HTML Tag


An HTML element may include a name, some attributes and some text and appears in one of the following four basic constructions...

  1. <tag_name> text </tag_name>
  2. <tag_name attribute_name=argument> text </tag_name>
  3. <tag_name>
  4. <tag_name attribute_name=argument>


Let's look at some examples of each format...


















Examples:

  1. <tag_name> text </tag_name>

    <B>This text is bold! <B>

    This text is bold!



  2. <tag_name attribute_name="argument"> text </tag_name>

    <FONT size="-1" color="maroon">This text is maroon and reduced in size...</FONT>

    This text is maroon and reduced in size...



  3. <tag_name>

    <HR>




  4. <tag_name attribute_name=argument>

    <HR width="70%">