Defining a Tag, Element and Attribute
Tags
The basic structure of an HTML document includes tags, which surround content and apply meaning to it.
Attributes
Tags can also have attributes,
which are extra bits of information. Attributes appear inside the
opening tag and their values sit inside quotation marks. They look
something like
<tag attribute="value">Margarine</tag>
. We will come across tags with attributes later.Elements
Tags tend not to do much more than mark the beginning and end of an
element. Elements are the bits that make up web pages. You would say,
for example, that everything that is in between (and includes) the
<body>
and </body>
tags is the body element. As another example, whereas “<title>
” and “</title>
” are tags, “<title>Rumple Stiltskin</title>
” is a title element.
No comments:
Post a Comment