b tag
big tag
code tag
dfn tag
pre tag
small tag
strong tag
tt tag
TAG: h1, h2, h3, h4, h5, h6
<h#> ... </h#>
where # = 1, 2, 3, 4, 5, or 6
The
h1, h2, h3, h4, h5, h6
tags are used to create text headers for a document. They can display the header text in one of six different sizes.
h1
is the largest size and, as the integer number increases to
h6
, the text size becomes progressively smaller. The exact display appearance of the header text is browser dependent.
This tag also automatically inserts a carriage return and line feed after the closing tag (i.e., a paragraph break).
The true purpose of this tag is only to create headers and titles, and not to set text font size. You are to use style sheets to set the font properties for a text.
The separate closing tag is mandatory.
Attributes and Events
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML h Tag Example</title>
</head>
<body>
<
h1
>DevGuru in h1<
/h1
>
<
h2
>DevGuru in h2<
/h2
>
<
h3
>DevGuru in h3<
/h3
>
<
h4
>DevGuru in h4<
/h4
>
<
h5
>DevGuru in h5<
/h5
>
<
h6
>DevGuru in h6<
/h6
>
</body>
</html>
Output:
DevGuru in h1
DevGuru in h2
DevGuru in h3
DevGuru in h4
DevGuru in h5
DevGuru in h6
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information