HTML5 Elements
HTML5 elements
are marked up using start tags and end tags. Tags are delimited using angle
brackets with the tag name in between.
The difference
between start tags and end tags is that the latter includes a slash before the
tag name.
Following is
the example of an HTML5 element −
<p>...</p>
HTML5 tag
names are case insensitive and may be written in all uppercase or mixed case,
although the most common convention is to stick with lower case.
Most of the
elements contain some content like <p>...</p> contains a paragraph.
Some elements, however, are forbidden from containing any content at all and
these are known as void elements. For example, br, hr, link and meta etc.
Here is a
complete list of HTML5 Elements.
HTML5
Attributes
Elements may
contain attributes that are used to set various properties of an element.
Some
attributes are defined globally and can be used on any element, while others
are defined for specific elements only. All attributes have a name and a value
and look like as shown below in the example.
Following is
the example of an HTML5 attributes which illustrates how to mark up a div
element with an attribute named class using a value of "example" −
<div
class="example">...</div>
Attributes may
only be specified within start tags and must never be used in end tags.
HTML5
attributes are case insensitive and may be written in all upper case or mixed
case, although the most common convention is to stick with lower case.
Here is a
complete list of HTML5 Attributes.
0 Comments