The comment tag is used to insert comments in the source code. Comments are not displayed the browser. You can use comment to explain your code at to hide scripts from browsers without support for scripts.
Syntax
The comments tag is written as<!-- --> with the comments inserted between the start and end tags.
Note that the exclamation mark is only used in the start tag
Program
<! Doctype html>
<html>
<body>
<!-- This is a comment -->
<p>This is a paragraph</p>
<!-- comments are not displayed in the browser -->
</body>
</html>
Comments tag output
This is a paragraph
2) Multiple Lines Comments
There is no difference between tag usage wheather you're commenting out one line or multiple lines. You still insert the comments between the start and end tags .you can even have the start and end tags on their own line. This can make your comments easier to read.
Program
<! --
This is line 1
This is line 2
And this line 3
-->
<P>This is normal text and is displayed to the users </p>
The <table> tag is written as </table>with the various table elements nested between the start and end tags.
The HTML table consists of the <table> element and one or more <tr>,<th>,and<td> element. The <tr> element defines a table row , the <th> element defines a table header, and the <td>element defines a table cell. A more complex HTML table may also include <caption>, <col>, <colgroup>,<thead><tfoot> and <tbody> element. The HTML table allow web authors to arrange data link text, images , links text, images, links other tables etc. into rows and columns of cells.
The HTML Teletype Text Element (<tt>) produces an inline element displayed in the browser's default monotype font. This element was intended to style text as it would display on a fixed width display, such as a teletype. It probably is more common to display fixed width type using the <code> element. This element is obsolete. Use a more appropriate element, such as<code> or <span> with CSS, instead.
Example
<!DOCTYPE html>
<html>
<body>
<p>This text is normal.</p>
<p><tt>This text is teletype text. </tt></p>
<P><strong>Note : </strong>The tt element is not supported in HTML5.</p>
</Body>
</html>
Teletype Element output
This text is normal.
This text is teletype text.
Note: The tt element is not supported in HTML5.
2) Anchor links and Named Anchors
A link is specified using HTML tag <a>. This tag is called anchor tag and anything between the opening <a> tag and the closing </a> tag becomes part of the link and a user can click that part to reach to the linked document.
You can set colors of your links, active links and visited links using link, alink and Vlink attributes of <body> tag.
When you move the mouse over a link, two things
1) The mouse arrow will turn into a little hand .
2) The color of the link element will change.
By default, a link will appear link
1) An unvisited link is underlined and blue.
2) An visited is underlined and. Purple.
3) An active link is underlined and red.
Example
<! Doctype html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body alink ="blue" link ="red" Vlink= "pink"> <P>click following link </p> <a href = "www.google.com" target ="_blank">HTML tutorial</a>
</body>
</html>
Links - Color output
click following link
HTML tutorial
4) Image Tag
An image can be inserted into a web page using the tag <img>. The <img> tag is empty tag. This tag takes the name of the image file as an attribute.
The <img> tag is used to embed an image in an HTML page. Images are not technically inserted into a web page; images are linked to web pages. The <img> tag creates a holding space for the referenced image. The <img> tag has two required attributes: src - Specifies the path to the image.
Syntax
<Img src = "Url">
Attribute
1) Align :-. Top bottom middle left right
Not supported in HTML5 Specifies the alignment of an image according to surrounding element.
2) Alt :- Text
Specifies an alternate text for an image.
3) border :- Pixels
Specifies the width of the border around an image.
<img src="2.jpg" height="100" width="100"align="centre" alt ="middle image">
</body>
</html>
Image Tag output
5) paragraph Tag
The <p> tag defines a paragraph. Browsers automatically add some space (margin) before and after each <p> element. The margins can be modified with css
The Paragraph element. The <p> HTML element represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields.
Attribute
1) Align :- Left, right, centre, justify
Specifies the alignment of the text with in paragraph
paragraph Tag
Example :-
<! Doctype html>
<html>
<body>
<P align =left> is a first paragraph.this is a first paragraph Paragraphs tags or <p> tags in HTML help us create paragraphs on a web page. On web browsers, paragraphs display as blocks of text separated from adjacent blocks by blank lines, white spaces, or first-line indentation</p>
<p align=right>Paragraphs tags or <p> tags in HTML help us create paragraphs on a web page. On web browsers, paragraphs display as blocks of text separated from adjacent blocks by blank lines, white spaces, or first-line indentation </p>
The HTML. <hr> tag is used for creating a horizontal line. This is also called Horizontal Rule in HTML <hr> tag also supports following additional attributes.
Attribute
1) Align : left, right, centre
Description :- It specifies the alignment of the horizontal line.
2) No shade
It Removes the usual shading effect that most browsers display
3) Size
It Specifies the height of the horizontal line.
4) Width
It Specifies the width of the horizontal.
Example
<!DOCTYPE html>
<html>
<body>
<p>Horizontal Ruler <hr></p>
<p>Horizontal Ruler <hr></p>
<p>Horizontal Ruler chr></p>
</body>
</html>
Drawing Line output
Horizontal Ruler
___________________________________
Horizontal Ruler
___________________________________
Horizontal Ruler
___________________________________
2) Quote Element
The <q> tag defines a short quotation. Browsers normally insert quotation marks around the quotations.
Attribute
1) Cite :- URL
Specifies the source URL of the quote
Example
<! Doctype html>
<html>
<body>
<p>wwF's goal is to:
<q>Build a future where people live in harmony with nature.</q>
We hope they succeed.</p>
</Body>
</html>
Quote Element output
wwF's goal is to: "Build a future where people live in harmony with nature. "We hope they succeed.
3)Subscript Element
The <sub> tag defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, H2O.
The <sub> tag is used to add a subscript text to the HTML document. The <sub> tag defines the subscript text. Subscript text appears half a character below the normal line and is sometimes rendered in a smaller font.
Example
<!DOCTYPE htal>
<html>
<body>
<P>This text contains <Sub>subscript</sub>text.</p> <p>This text contains<sup>superscript</sub>text.</p></Body>
</html>
Subscript Element output
This text contains subscribe text.
This text contains subscribe text.
4)Big Element
The HTML Big Element (<big>) makes the test font size one size bigger (for example, from small to medium, or from large to x- large) up to the browser's maximum font size.
Example
<! Doctype html>
<html>
<body>
<p>This text is normal.</p>
<P><big>This text is bigger. </Big></p>
<P><strong>Note: </strong>The big element is not supported in HTML5. </P>
</Body>
</html>
Big Element output
This text is normal.
This text is bigger.
Note : This big element is not supported in html 5.
5) Small Element
The HTML Small Element (<small>) makes the text font size one size smaller (for example, from large to medium, or from small to x-small) down to the browser's minimum font size. In HTML5, this element is repurposed to represent side-comments and small print, including copyright and legal text.
Example
<!DOCTYPE html>
<html>
<body>
<P>pssmovement - the world's largest free Meditation training movement.</p>