
HTML stands for H yper T ext M arkup L anguage, which is the most widely used language on Web to develop web pages. HTML was created b...
Everything is in this blog
HTML stands for H yper T ext M arkup L anguage, which is the most widely used language on Web to develop web pages. HTML was created b...
HTML stands for H yper t ext M arkup L anguage, and it is the most widely used language to write Web Pages. Hypertext refers to the ...
Heading Tags Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings...
An HTML element is defined by a starting tag. If the element contains other content, it ends with a closing tag, where the element n...
We have seen few HTML tags and their usage like heading tags , , paragraph tag and other tags. We used them so far in their simple...
If you use a word processor, you must be familiar with the ability to make text bold, italicized, or underlined; these are just three ...
The phrase tags have been designed for specific purposes, though they are displayed in a similar way as other basic tags like , , ,...
HTML lets you specify metadata - additional important information about a document in a variety of ways. The META elements can be use...
Comment is a piece of code which is ignored by any web browser. It is a good practice to add comments into your HTML code, especially ...
Images are very important to beautify as well as to depict many complex concepts in simple way on your web page. This tutorial will ...
The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells. The HTM...
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.
Hello World!
This is document title
Tag | Description |
---|---|
This tag defines the document type and HTML version. | |
This tag encloses the complete HTML document and mainly comprises of document header which is represented by ... and document body which is represented by ... tags. | |
This tag represents the document's header which can keep other HTML tags like | |
The | |
This tag represents the document's body which keeps other HTML tags like
, etc. | |
This tag represents the heading. | |
| This tag represents a paragraph. |
To learn HTML, you will need to study various tags and understand how do they behave while formatting a textual document. Learning HTML is simple as users have to learn the usage of different tags in order to format the text or images to make a beautiful webpage.
World Wide Web Consortium (W3C) recommends to use lowercase tags starting from HTML 4.
A typical HTML document will have following structure:
Document declaration tag
Document header related tags Document body related tags
We will study all the header and body tags in subsequent chapters, for now let's see what is document declaration tag.
The declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:
There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing tag along with other HTML tags.
Here is a first paragraph of text. Here is a second paragraph of text. Here is a third paragraph of text. This will produce following result:Paragraph Example
HelloLine Break Example
This text is not in the center.Centring Content Example
This is paragraph one and should be on topHorizontal Line Example
.
tag and the closingtag will preserve the formatting of the source document.
Preserve Formatting Example
function testFunction( strText ){ alert (strText) }
...tags
An example of this technique appears in the movie "12 Angry Men."In cases where you do not want the client browser to break text, you should use a nonbreaking space entity instead of a normal space. For example, when coding the "12 Angry Men" in a paragraph, you should use something similar to the following code:
An example of this technique appears in the movie "12 Angry Men."Nonbreaking Spaces Example
Start Tag | Content | End Tag |
---|---|---|
This is paragraph content. |
Nested Elements Example
This will display following result:Align Attribute Example This is left alignedThis is center alignedThis is right aligned
This para explains what is HTMLThis para explains what is Cascading Style Sheet
This will produce following result:The title Attribute Example Titled Heading Tag Example
class="className1 className2 className3"
This will produce following result:The style Attribute Some text...
Value | Meaning |
---|---|
ltr | Left to right (the default value) |
rtl | Right to left (for languages such as Hebrew or Arabic that are read right to left) |
This will produce following result:Display Directions This is how IE 5 renders right-to-left directed text.
English Language Page This page is using English Language
Attribute | Options | Function |
---|---|---|
align | right, left, center | Horizontally aligns tags |
valign | top, middle, bottom | Vertically aligns tags within an HTML element. |
bgcolor | numeric, hexidecimal, RGB values | Places a background color behind an element |
background | URL | Places a background image behind an element |
id | User Defined | Names an element for use with Cascading Style Sheets. |
class | User Defined | Classifies an element for use with Cascading Style Sheets. |
width | Numeric Value | Specifies the width of tables, images, or table cells. |
height | Numeric Value | Specifies the height of tables, images, or table cells. |
title | User Defined | "Pop-up" title of the elements. |
The following word uses a bold typeface. This will produce following result:Bold Text Example
The following word uses a italicized typeface. This will produce following result:Italic Text Example
The following word uses a underlined typeface. This will produce following result:Underlined Text Example
The following word uses aStrike Text Example
The following word uses a monospaced typeface. This will produce following result:Monospaced Font Example
The following word uses a superscript typeface. This will produce following result:Superscript Text Example
The following word uses a subscript typeface. This will produce following result:Subscript Text Example
I want to drinkInserted Text Example
I want to drinkDeleted Text Example
The following word uses a big typeface. This will produce following result:Larger Text Example
The following word uses a small typeface. This will produce following result:Smaller Text Example
Div Tag Example
This is the example of style="color:green">span tag and the style="color:red">div tag alongwith CSS This will produce following result:Span Tag Example
, and , you have seen in previous chapter. This chapter will take you through all the important phrase tags, so let's start seeing them one by one.
This will produce following result:Emphasized Text Example The following word uses a emphasized typeface.
This will produce following result:Marked Text Example The following word has been marked with yellow
This will produce following result:Strong Text Example The following word uses a strong typeface.
This will produce following result:Text Abbreviation My best friend's name is Abhy.
This will produce following result:Acronym Example This chapter covers marking up text in XHTML.
This will produce following result:Text Direction Example This text will go left to right. This text will go right to left.
This will produce following result:Special Terms Example The following word is a special term.
...tags.
element is usually indented from the left and right edges of the surrounding text, and sometimes uses an italicized font.
This will produce following result:Blockquote Example The following description of XHTML is taken from the W3C Web site:XHTML 1.0 is the W3C's first Recommendation for XHTML, following on from earlier work on HTML 4.01, HTML 4.0, HTML 3.2 and HTML 2.0.
XHTML 1.0 is the W3C's first Recommendation for XHTML, following on from earlier work on HTML 4.01, HTML 4.0, HTML 3.2 and HTML 2.0.
...element is used when you want to add a double quote within a sentence.
This will produce following result:Double Quote Example Amit is in Spain,I think I am wrong.
I think I am wrong.
This will produce following result:Citations Example This HTML tutorial is derived from W3 Standard for HTML.
...
tags. Usually the content of the element is presented in a
monospaced font, just like the code in most programming books.
This will produce following result:Computer Code Example Regular text.This is code.
Regular text.
This is code.
Regular text.This will produce following result:Keyboard Text Example Regular text. This is inside kbd element Regular text.
elements to indicate that the content of that element is a variable.This will produce following result:Variable Text Example document.write("user-name")
document.write("user-name")
This will produce following result:Program Output Example Result produced by the program is Hello World!
This will produce following result:Address Example 388A, Road No 22, Jubilee Hills - Hyderabad
Attribute | Description |
---|---|
Name | Name for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc. |
content | Specifies the property's value. |
scheme | Specifies a scheme to interpret the property's value (as declared in the content attribute). |
http-equiv | Used for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie. |
This will produce following result:Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
If you do not include the expiration date and time, the cookie is considered a session cookie and will be deleted when the user exits the browser.Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
To serve the static page with traditional Chinese characters, the webpage must contain a tag to set Big5 encoding:Meta Tags Example Hello HTML5!
Meta Tags Example Hello HTML5!
Document content goes here..... This will produce following result without displaying the content given as a part of comments:
Document content goes here..... But following line is not a valid comment and will be displayed by the browser. This is because there is a space between the left angle bracket and the exclamation mark.
< !-- This is not a valid comment --> Document content goes here..... This will produce following result:
Document content goes here..... This will produce following result:
Document content goes here..... You will come across a situation where you will need to apply a different style sheet based on different versions of Internet Explorer, in such situation conditional comments will be helpful.
This is not Internet Explorer. If you are using IE then it will produce following result:
--> Hello , World! This will produce following result:
-->
-list/> Theattributes
This will produce following result:Using Image in Webpage Simple Image Insert![]()
This will produce following result:Using Image in Webpage Simple Image Insert![]()
This will produce following result:Set Image Width and Height Setting image width and height![]()
This will produce following result:Set Image Border Setting image Border![]()
This will produce following result:Set Image Alignment Setting image Alignment![]()
border="1"> Row 1, Column 1HTML Tables
Row 1, Column 1 | Row 1, Column 2 |
Row 2, Column 1 | Row 2, Column 2 |
border="1"> NameHTML Table Header
Name | Salary |
---|---|
Ramesh Raman | 5000 |
Shabbir Hussein | 7000 |
border="1" cellpadding="5" cellspacing="5"> NameHTML Table Cellpadding
Name | Salary |
---|---|
Ramesh Raman | 5000 |
Shabbir Hussein | 7000 |
border="1"> Column 1HTML Table Colspan/Rowspan
Column 1 | Column 2 | Column 3 |
---|---|---|
Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 |
Row 2 Cell 2 | Row 2 Cell 3 | |
Row 3 Cell 1 |
border="1" bordercolor="green" bgcolor="yellow"> Column 1HTML Table Background
Column 1 | Column 2 | Column 3 |
---|---|---|
Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 |
Row 2 Cell 2 | Row 2 Cell 3 | |
Row 3 Cell 1 |
border="1" bordercolor="green" background="/images/test.png"> Column 1HTML Table Background
Column 1 | Column 2 | Column 3 |
---|---|---|
Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 |
Row 2 Cell 2 | Row 2 Cell 3 | |
Row 3 Cell 1 |
border="1" width="400" height="150"> Row 1, Column 1HTML Table Width/Height
Row 1, Column 1 | Row 1, Column 2 |
Row 2, Column 1 | Row 2, Column 2 |
border="1" width="100%"> This is the captionHTML Table Caption
row 1, column 1 | row 1, columnn 2 |
row 2, column 1 | row 2, columnn 2 |
border="1" width="100%">HTML Table
colspan="4">This is the head of the table |
This is the head of the table | |||
This is the foot of the table | |||
Cell 1 | Cell 2 | Cell 3 | Cell 4 |
border="1" width="100%">HTML Table
Name | Salary |
---|---|
Ramesh Raman | 5000 |
Shabbir Hussein | 7000 |