Summary -

In this topic, we described about the below sections -

Phrase tags are used for special purpose like to display text in the middle of the paragraph. HTML supports various phrase tags.

<acronym>

The <acronym> tag is not supported in HTML5. The <acronym> tag used to define an acronym. An acronym used when to spell out another word.

Creating acronyms will provide useful information to browsers, translation systems and search-engines. The title attribute will be displayed the full version of the acronym when mouse placed over it. The <abbr> is replacement of <acronym> in HTML5.

Syntax -

<acronym>.. text here.. </acronym>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title> acronym example</title>
	</head>
	<body>
		<p><acronym title="TutorialsCampus">TC</acronym>
		 is a best online library in the world</p> 
	</body>
</html>

Output -

TC is a best online library in the world

<code>

Used to define the computer code. Code formatting is used to define the programming code. Code formatting uses <code> tag. Any text in between <code>..</code> defines it as programming code to browsers.

<code> element is nested element. <code> tag is also a phrase tag. The <code> element text normally displayed in a monospaced font. Multiple lines of code can be surrounding the <code> tags with <pre> tags.

Syntax -

<code>.... HTML text here </code>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title> Code formatting element example.. </title>
	</head>
	<body>
		<code>
			Var a = b + c
		</code>
	</body>
</html>

Output -

Var a = b + c

<dfn>

Used to defining instance of a term. The <dfn> tag used to represent the defining instance of term. The tag can be represented like <dfn></dfn> with the term inserted between the opening and closing tags.

The <dfn> can be used only once as one term need not to be defined if it already defined. The first instance (paragraph, description list group, or section) of specific <dtn> element appears in should contain definition of the term defined.

Syntax -

<dfn>.. text here.. </dfn>

Example -

<!DOCTYPE html>
<html>
<head>
	<title>details tag text example.. </title>
</head>
<body>
	<p><dfn>’s </dfn> objective is to deliver the point to point
	online content on various technologies (including technical and 
	non-technical) to encourage the reader to learn and gain expertise
   on their desired skills without any conditions and restrictions. </p>
</body>
</html>

Output -

’s objective is to deliver the point to point online content on various technologies (including technical and non-technical) to encourage the reader to learn and gain expertise on their desired skills without any conditions and restrictions.

<em>

Emphasized text is used to display the text as in emphasized text, with added semantic importance. Emphasized text uses <em> tag. <em> is also called as pharse tag.

Any text in between <em>..</em> displays as in Emphasized. <em> element is nested element.

Syntax -

<em>.. text here.. </em>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Emphasized text example.. </title>
	</head>
	<body>
		<p>This is <em> Emphasized </em> text</p>
	</body>
</html>

Output -

This is Emphasized text.

<kbd>

Keyboard Input. Keyboard formatting is used to define the keyboard input. Keyboard input means the input/text entered by the user in any means.

Keyboard formatting uses <kbd> tag. Any text in between <kbd>..</kbd> defines it as keyboard input to browsers. <kbd> element is nested element.

Syntax -

<kbd>.... HTML text here </kbd>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title> Keyboard formatting element example.. </title>
	</head>
	<body>
		<p><kbd> File > Open > type > save</kbd></p>
	</body>	
</html>

Output -

File > Open > type > save

<mark>

The <mark> tag was introduced in HTML 5. Highlighted text or marked text. Marked text is used to display the text as highlighted text.

For example, when displaying a paragraph in HTML document and wanted to highlight any quotation middle of the paragraph, <mark> tag will be used.

Marked text uses <mark> tag. Any text in between <mark>..</mark> displays as highlighted text. <mark> element is nested element.

Syntax -

<mark>.. text here.. </mark>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Marked text example.. </title>	
	</head>
	<body>
		<p>This is <mark>Marked</mark> text</p>
	</body>
</html>

Output -

This is Marked text

<samp>

Sample formatting is used to define the computer output. Sample formatting uses <samp> tag. Any text in between <samp>..</samp> defines it as computer output to browsers. <samp> element is nested element.

Syntax -

<samp>.... HTML text here </samp>

Example -

<!DOCTYPE html>
<html>
<head>
	<title>Sample formatting element example.. </title>
</head>
<body>
	<p><samp>Oracle Database 10g Enterprise Edition+10.2.0.1.0
	 </samp></p>
</body>
</html>

Output -

Verison: Oracle Database 10g Enterprise Edition+10.2.0.1.0

<strong>

Strong importance text in HTML document. Strong text is used to display the text as Strong with added semantic "strong" importance. Strong text uses <strong> tag.

Any text in between <strong >..</strong> displays as Strong. <strong> element is nested element.

The <strong> tag used to represent the strong importance, seriousness or urgency of its contents. The <strong> tag defines strong emphasized text in HTML 4.01, but in HTML5 it defines important text.

Syntax -

<strong>.. text here.. </strong>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Strong text example.. </title>
	</head>
	<body>
		<p>This is <strong>Strong </strong>text</p>
	</body>
</html>

Output -

This is Strong text

<var>

Defines a variable or Variable formatting in HTML document. Variable formatting is used to define the mathematical variable. Variable formatting uses <var> tag.

Any text in between <var>..</var> defines it as mathematical variable to browsers. <var> element is nested element. Mostly <var> used in mathematical expressions.

Syntax -

<var>.... HTML text here </var>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Sample formatting element example.. </title>
	</head>
	<body>
		<var> a = b * c </var>
	</body>
</html>

Output -

a = b * c