Upload
linda-stevens
View
215
Download
0
Embed Size (px)
Citation preview
U N D E R S TA N D I N G H T M L
Tags VS Attributes
Element
An element in HTML represents some kind of structure and generally consists of a start tag, content, and an end tag.
Tag
Tags are used to mark up the text.A Start Tag consists of an opening angle bracket (<),
the element, the attribute, and the closing bracket. <body> start tag with no attribute
An End tag consists of an opening angle bracket followed by a forward slash, the element name, and a closing angle bracket </body>
Empty Container
There are also some elements that are empty, meaning that they only consist of a single tag and do not have any content. In HTML, such tags look just like opening tags:
<br><hr><img src>
Attributes
An attribute defines a property for an element, consists of an attribute, and appears within the element’s start tag.
Tags Attributes
<body bgcolor= “black” text=“white” link= “red” vlink= “pink”> … </body>
Tag Attributes
Shirt
Jewelry
Long sleeve, blue, turtle neck, sweater
Bracelet, silver, with round diamonds and saphires, and a heart charm.
Tags VS Attributes
Attributes are ways to describe your tags!
Tag or Attribute
<body><hr>behavior= “…”direction= “…”height= “…”<font>…</font>width= “…”<marquee>…</marquee>
The answers…
<body><hr>behavior= “…”direction= “…”height= “…”<font>…</font>width= “…”<marquee>…</marquee>
Tags are green
Attributes are purple