Home | | Computer Applications 11th std | HTML: Headings and Attribute of Headings tag

Chapter: 11th Computer Applications : Chapter 10 : HTML - Structural Tags

HTML: Headings and Attribute of Headings tag

Headings are used to include titles to sections of a web page. HTML has six levels of headings viz.

to

.

Headings

 

Headings are used to include titles to sections of a web page. HTML has six levels of headings viz. <h1> to <h6>. The number with h indicates the level of heading. Header tags are display the body text as bolder and larger in size according to its level.

The syntax of heading tags:

<h…> Heading text </h…>

 

Illustration 10.6 – HTML code with Headings

<html>

<head>

        <title> Heading </title>

</head>

<body>

        <h1> Welcome to Computer Application</h1>

        <h2> Welcome to Computer Application</h2>

        <h3> Welcome to Computer Application</h3>

        <h4> Welcome to Computer Application</h4>

        <h5> Welcome to Computer Application</h5>

        <h6> Welcome to Computer Application</h6>

</body>

</html>


 

Attribute of Headings tag

 

Align is an attribute to set right, center and justify alignment to headings. Left if the default alignment, so that it is not supported in latest version of HTML. Justify alignment is not supported by older browsers.

The tag is to specify the alignment to headings:

<h# align = value>

Where # is the level number, value may be Right, Center or Justify. Justify alignment only used for paragraphs. The meaning of alignment is similar what you learnt from Word processor.

 

 Illustration 10.7 – HTML code with Heading and align attributes

<html>

<head>

        <title> Heading </title>

</head>

<body>

        <h1 align=center> Welcome to Computer Application </h1>

        <h2 align=right> Welcome to Computer Application </h2>

</body>

</html>

Output will be as follows



Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Applications : Chapter 10 : HTML - Structural Tags : HTML: Headings and Attribute of Headings tag |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.