Your Ad Here

Elements, Tags, and Attributes


One thing that drivesmeto distraction is the way terminology is constantly misused
in HTML. Very few of today’s working Web designers have had formal training in
the language, so misuse of nomenclature is understandable. However, the trouble
it causes is twofold:
Vague use of language makes it difficult for team members, including
project managers, to make clear, understandable statements.
An individual with an improper understanding of terminology may
influence or incorrectly instruct co-workers, causing confusion.
An element is a tagset, or a tag and any content it relates to. An element can be made
up of an opening and closing tag or a single tag. Any element that contains text
content (such as headers, paragraphs, and list items) is considered a nonempty
element and usually requires an opening and closing tag in HTML (although
as previously mentioned, HTML versions don’t require a closing tag for certain
elements, such as paragraphs and list items).
Any element that does not contain content is considered an empty element. Examples
include line breaks, horizontal rules, and images.
Elements are also considered to be either block or inline. A block element is one
that is self-contained. Block elements generate a carriage return. Examples include
headers, paragraphs, and list items. Inline elements are those used within a block
but without generating any breaks, such as links, images, emphasis, strong, and
so on.
Tags are the literal markup tags that are used to express the element, such as
<h1>...</h1>, <hr>, <meta>, and so on.
Attributes allow certain traits to be applied to an element. Attributes are made up
of two components, the attribute name and the attribute value. The name defines
what the attribute is, and the value (which can vary in value types) describes how
the attribute is to be applied, such as in the following example:

align="right"

0 comments:

Post a Comment

Popular Posts

Recent posts