Home » HTML

HTML Comments and Quotations

Comment and Quotation in HTML: Here, we are going to learn about the HTML comments and HTML Quotation tag.
Submitted by Jhanvi Tripathi, on July 23, 2019

HTML Comments

To insert a comment in an HTML document, the comment tags are used. The comments are used to provide some information that could be useful for anyone who views the code of the webpage. The comments can be inserted by any number of times within the webpage. Also, a notable point is that the comments are not visible on the webpage. That means the text in the comments are ignored by the web browser and thus it is not visible on the webpage.

The HTML comments are placed between the symbols <!-- text -->

The syntax of the comment tag is as,

    <!--
    This is a comment in the HTML document.
    --> 

The comments could be inserted in wherein the document. It increases the readability of the code in the document. Also, the comments in HTML are supported by almost all of the present-day browsers. These comments are multi-line comments.

Below is an example to illustrate the use of comments,

<!-- The sample HTML code -->
<html>

<body>
    <p>Line before the comment.</p>
<!-- 
This is the comment line
any text can be written here
that will not display on the webpage.
-->
    <p>Line after the comment.</p>

</body>

</html>

Output

HTML comment tag

HTML Quotation

<q> elements: The quotations in HTML document are added by using the <q> tag. The text which is to be displayed in quotes is written in between the <q> tag.

Example:

    <p>Welcome at <q>IncludeHelp</q>.</p>

Output

Welcome at "IncludeHelp".

The <q> tag is used for the small quotation in the text.

<blockqoute> element

The <blockquote> element is also used for creating quotations. But it is somewhat different from the <q> element. Unlike the <q> tag, the <blockqoute> do not put quotations(") in the text, but it changes the alignment of the text to make it different from other texts on the webpage. The browser generally intends the content in the BLOCKQUOTE tag.

An example of <blockqoute> tag

<!-- The sample HTML code -->
<html>

<body>

<p> 
	the text is blockqoute is quoted differently then the other text 
	<blockquote> some text in the BLOCKQOUTE element </blockquote>
</p> 

</body>

</html>

Output

HTML blockquote tag

<address> element

The <address> element specifies an address within the webpage and the text that is inside the address tag would be emphasized. It also has both the tags: opening and closing tags.

An example of <address> tag

<!-- The sample HTML code -->
<html>

<body>

    <address> 
		<p>
			Address:<br> 
			123-block, LN road<br> 
			Sector-110, Delhi 
		</p> 
    </address> 


</body>

</html>

Output

HTML address tag example

<abbr> element

The <abbr> element is used to define a text as an acronym or abbreviations. The title attribute can be used to show the full version of the abbreviation/acronym when you mouse over the <abbr> element. It has both opening and closing tags.

An example of <abbr> tag

<!-- The sample HTML code -->
<html>

<body>

	<p> 
		place your mouse over the following text :  
		<abbr title=" World Wide Web "> www </abbr> 
	</p>


</body>

</html>

Output

HTML abbr tag example



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.