Strong Text - The <strong> Element:
The <strong> element is intended to show strong emphasis for its content; stronger emphasis than the <em> element. As with the <em> element, the <strong> element should be used only when you want to add strong emphasis to part of a document.
<p>You <strong>must</strong> remember to close elements in XHTML.</p>
This will produce following result:
You must remember to close elements in XHTML.
Text Abbreviation - The <abbr> Element :
You can indicate when you are using an abbreviated form by placing the abbreviation between opening <abbr> and closing </abbr> tags.
<p>I have a friend called <abbr title="Abhishek">Abhy</abbr>.</p>
This will produce following result:
I have a friend called Abhy.
Using Acronym - The <acronym> Element :
The <acronym> element allows you to indicate that the text between an opening <acronym> and closing </acronym> element is an acronym.
When possible use a title attribute whose value is the full version of the acronyms on the <acronym> element, and if the acronym is in a different language, include an xml:lang attribute in XHTML documents.
<p>This chapter covers marking up text in <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>.</p>
This will produce following result:
This chapter covers marking up text in XHTML.
At present, the major browsers do not change the appearance of the content of the <acronym> element.
Special Terms - The <dfn> Element :
The <dfn> element allows you to specify that you are introducing a special term. Its use is similar to the words that are in italics in the midst of paragraphs in this book when new key concepts are introduced.Typically, you would use the <dfn> element the first time you introduce a key term and only in that instance. Most recent browsers render the content of a <dfn> element in an italic font.
<p>This tutorial teaches you how mark up your documents for the web using <dfn>XHTML</dfn>.</p>
This will produce following result:
This tutorial teaches you how mark up your documents for the web using XHTML.
Quoting Text - The <blockquote> Element :
When you want to quote a passage from another source, you should use the <blockquote> element.Text inside a <blockquote> element is usually indented from the left and right edges of the surrounding text, and sometimes uses an italicized font.
<p>The following description of XHTML is taken from the W3C Web site:</p>
<blockquote> 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. </blockquote>
This will produce following result:
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.
Citations - The <cite> Element :
If you are quoting a text, you can indicate the source placing it between an opening <cite> tag and closing </cite> tagAs you would expect in a print publication, the content of the <cite> element is rendered in italicized text by default.
<p>This HTML Tutorial is derived from <cite>World Wide Web Standard for HTML</cite>.</p>
This will produce following result:
This HTML Tutorial is derived from World Wide Web Standard for HTML.
Computer Code - The <code> Element :
Any code to appear on a Web page should be placed inside a <code> element. Usually the content of the <code> element is presented in a monospaced font, just like the code in most programming books.<h1> <code>This is inside code element</code></h1>
This will produce following result:
This is inside code element
Programming Variables - The <var> Element :
This element is usually used in conjunction with the <pre> and <code> elements to indicate that the content of that element is a variable that can be supplied by a user.<p><code>document.write("<var>user-name</var>")</code></p>
This will produce following result:
document.write("user-name")
Program Output - The Element :
The element indicates sample output from a program, script, or the like. Again, it is mainly used when documenting programming concepts. For example: The element indicates sample output from a program, script, or the like. Again, it is mainly used when documenting programming concepts. For example:
<p>Result produced by the program is <samp>Hello World</samp></p>
This will produce following result:
Result produced by the program is Hello World
No comments:
Post a Comment