Simple HTML Tags (Page 2)

 

 

Headings

 

The <h> tag is to specify headings in HTML. There are 6 levels of headings in HTML, ranging from h1 for the most prominent, to h6 for the least prominent. The <h> tag makes the font larger and bold, and it also creates a line break with an extra space after the heading.

 

HTML Examples:

 

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

 

Result:

 

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

 

 

The heading tag is used to unify all the headings in your webpage.

 

HTML Example:

 

<h3>Welcome</h3>
In this page we explain about the services we offer in our company.

 

Result:

Welcome

In this page we explain about the services we offer in our company.

 

 

 

Horizontal Rule (Line)

 

You can insert a horizontal line by inserting the <hr> tag anywhere in your page.  NOTE: This code is a single code and should be closed within the tag.

 

HTML Example:      

<hr>

 

Result:

 


 

 

Attributes

 

Attributes are added to a tag to provide the browser with more information about how the tag should appear or behave. Attributes consist of a name and a value separated by an equals sign. The value should be placed in quotation marks. HTML tags can contain one or more attributes separated by a single space.

 

Syntax: name=”value”

 

 

HTML Example:

Here's an example of adding two attributes to the <hr> tag:

<hr width="600" size=”6” color="#00ff00">

 

Result:                       

 


 

 

 

NOTE: attributes are only used inside the opening tag.

 

 

 

 

Buy "Digest Web Design" PDF Book

 

All the information on this website is also provided in a PDF book for only $30.
Click here to buy.

 

 

<<    Previous Page                                                                    Next Page    >>