HTML Online Tutorial Contents

Following are the posts for HTML online Tutorial. To learn everything about HTML, just read these posts: HTML Online Tutorial HTML TAGS (2) HTML BASICS (3) HTML ELEMENTS (4) HTML ATTRIBUTES (5) More »

XHTML

XHTML stands for Extensible Hypertext Markup Language. It is also known as XML (Extensible Markup Language). It is a markup language. In XHTML, there are no predefined tags. The user defines the More »

HTML SUMMARY

In this tutorial, you learned: HTML Introduction HTML Tags HTML Basics HTML Elements HTML Attributes HTML Paragraphs HTML Headings HTML Formats HTML Image HTML Links HTML Lists HTML Frames HTML Table After More »

HTML TABLES (13)

HTML Tables are used to arrange data in web pages. HTML allows the use of tables by <table>…</table> tags. Each row in HTML table is recognized by <tr>…</tr> tag. In each row More »

HTML FRAMES (12.2)

Nested frames example: For the following example to work, there are two other simple HTML files : “HMTL11e1 frame a.html” and “HMTL11e1 frame b.html”. your browser will divide your screeub half. The More »

 

Tag Archives: HTML headings

headings 7

HTML HEADINGS 7

HTML headings are important part of web pages. There are six sizes of headings. There are separate tags for each size of heading. But the general syntax of heading tag is: <ha>…</ha>. Where, “a” is a number of heading size. e.g. <h1>..</h1> is used for heading # 1(largest heading size).

Following is the heading tags and their result:


HEADING TAG VALUES
<ha>….</ha> <h1>…</h1>
<h2>…</h2>
<h3>…</h3>
<h4>…</h4>
<h5>…</h5>
<h6>…</h6>

 

Sizes of Headings:


 

It is important to use headings for headings only. Search engines use headings to search and index the content of any web page.

HTML HEADINGS:

Following example shows different sizes of headings:

Example 6.1:

<html>

 

<head>

<title>Website-School/HTML Headings example 1</title>

</head>

 

<body>

<h1>This is Heading #1</h1>

<h2>This is Heading #2</h2>

<h3>This is Heading #3</h3>

<h4>This is Heading #4</h4>

<h5>This is Heading #5</h5>

<h6>This is Heading #6</h6>

</body>

 

</html>

For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

paragraphs 6.2

HTML Paragraph (6.2)

HTML Center Aligned Paragraph:

Following example shows the use of Align attribute in paragraph tag. In this example the value of Align attribute is Center.


Example5.3:

<html>

 

<head>

<title>Website-School/HTML Paragraphs example 3</title>

</head>

 

<body>

<p ALIGN=”center”>This paragraph is displayed in center because value of Align attribute is center. </p>

</body>

</html>

Right Aligned Paragraph:

Following example shows the use of Align attribute in paragraph tag. In this example the value of Align attribute is Right. Example5.4:

<html>

 

<head>

<title>Website-School/HTML Paragraphs example 4</title>

</head>

 

<body>

<p ALIGN=”right”>This paragraph is displayed at right because value of Align attribute is right. </p>

</body>

</html>

Justified Paragraph:

Following example shows the use of Align attribute in paragraph tag. In this example the value of Align attribute is Justify.

Example5.5:

<html>

 

<head>

<title>Website-School/HTML Paragraphs example 5</title>


</head>

 

<body>

<p ALIGN=”justify”>This paragraph is displayed as justified because value of Align attribute is justify.This paragraph is displayed as justified because value of Align attribute is justify.This paragraph is displayed as justified because value of Align attribute is justify.This paragraph is displayed as justified because value of Align attribute is justify. </p>

</body>

 

</html>

For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

paragraphs 1

HTML PARAGRAPHS (6.1)

HTML PARAGRAPHS:

HTML paragraphs are used to add text in web pages. The tag used for this purpose is <p>…</p>. The paragraph line’s width depends on the width of window or container. HTML adds a line before and after the paragraph in default.


Simple Paragraph:

HTML ignores extra added spaces in paragraphs. Multiple spaces will be displayed as one space.

Following is a simple example, which shows displaying of a paragraph.

Example5.1:

<html>

 

<head>

<title>Website-School/HTML Paragraphs example 1</title>

</head>

 

<body>

<p> This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.</p>

</body>

 

</html>

 

Spaces in Paragraphs:

HTML ignores extra added spaces in paragraphs. Multiple spaces will be displayed as one space.

Example5.2:

<html>

 

<head>

<title>Website-School/HTML Paragraphs example 2</title>

</head>

 

<body>

<p> The     spaces              in              this                  paragraph                     is              ignored                     by                     HTML                                   </p>

</body>

</html>

The important attributes of the paragraph tag: Align

AT-TRIBUTE VALUES DISCR-IPTION
ALIGN RightCenterLeft (default value) It specifies the alignment of paragraph inside <P>…</p> tag. 

For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

attributes 5

HTML ATTRIBUTES (5)

Html elements can also contain attributes. HTML attributes provide extra information about HTML elements. HTML attributes general syntax is name=”value”. Moreover HTML attributes are always defined in start tag.e.g.

<a href=”index.html”> index</a>

In this example href is given as an HTML attribute to the <a>…</a> tag. Note that attribute is given in start tag. Also note the syntax of defined attribute.


HTML Attributes:

Attributes values are always quoted. There are some cases when attributes values have either double or single quotation marks in them then the syntax should be:

Name=”value ’single quotes ’double quotes”

Name=’value ”double quotes” single qoutes’

In this example href is given as an HTML attribute to the <a>…</a> tag. Note that attribute is given in start tag. Also note the syntax of defined attribute.


Example4.1:

<html>

 

<head>

<title>Website-School/HTML Attributes example 1</title>

</head>

 

<body>

 

<img src=”homeb.gif” width=”153″ height=”73″ alt=”home” />

<p> This image is displayed using image tags inside the body tags. Src, width, height and alt are given as attributes to an image tag.</p>

</body>

</html>


For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

elements 4

HTML ELEMENTS (4)

HTML elements are defined as a command that tells a browser to do something e.g. <title> tag pair. Everything inside the HTML tags is known as element contents. The start/opening tag defines the start of a HTML element. Similarly, the end/closing tag defines the end of a HTML element.


Example 1:

The <html> element defines whole html file. Similarly <head> element defines title of document using another <title> element.

EMPTY ELEMENTS:

Some HTML tags have nothing inside them. Such HTML elements are empty. Empty elements are often closed in start tag.

Example 2:

The line break tag is used to insert a line in document layout. It is closed in the start tag. Moreover it does not contain any content so it is empty element. e.g. </br>

HTML elements can also contain some attributes. e.g.


<a href=”index.html”> index</a>

In this example href is given as an HTML attribute to the <a>…</a> tag.

For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial