Create heading with H1 H2 H3 H4 H5 H6
Description
The h1
element represents a heading.
HTML defines a hierarchy of heading elements,
with h1
being the highest ranked.
The other heading elements are h2
, h3
,
through to h6
.
Headings of the same rank breaks up content so that each topic is in its own section.
Example
The following code uses the h1?h3 Elements.
<!DOCTYPE HTML>
<html>
<body>
<h1>This is h1.</h1>
<p>I like XML.</p>
<h2>Additional h2</h2>
<p>I like XML.</p>
<h3>More information</h3>
<p>I like XML.</p>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<h1>Basic Text Formatting</h1>
<p>The purpose of a web browser is
to read HTML documents and compose them into visible
or audible web pages. The browser does not display
the HTML tags, but uses the tags to interpret the
content of the page. HTML describes the structure
of a website semantically along with cues for
presentation, making it a markup language rather
than a programming language. </p>
<!-- w w w . j a va 2 s . c om-->
<h2>White Space and Flow</h2>
<p>HTML elements form the building blocks of all
websites. HTML allows images and objects to be
embedded and can be used to create interactive
forms. It provides a means to create structured
documents by denoting structural semantics for
text such as headings, paragraphs, lists, links,
quotes and other items. It can embed scripts
written in languages such as JavaScript
which affect the behavior of HTML web pages.</p>
<h2>Creating Headings</h2>
<p> Web browsers can also refer to Cascading Style
Sheets (CSS) to define the look and layout of text
and other material. The W3C, maintainer of both
the HTML and the CSS standards, encourages the
use of CSS over explicit presentational HTML.</p>
</body>
</html>