Greetings!!!!
A Warm Welcome to you all. hope you are in good zeal and enthusiasms... lets utilize our energy in the today's Session. Starting with the PRE tag
Pre Tag:-
The tag is used to display the text on the web as it is typed or we can say it is pre formatted text tag..
Syntax:-- <pre>.. </pre> Type:-- Conatiner Tag Contains Text Purpose:-- used to preserve spaces and line breals Example:-- <pre> This text
preserving both spaces and line breaks </pre>
Optional Attributes:--
1. Width * Values:- number * Purpose:- Defines the maximum number of characters per line (usually 40, 80, or 132). * Example :-- <pre width = "40 ">Sample Text containing more than 40 characters</pre> * Note:- this is Deprecated. Use styles instead
Differences Between HTML and XHTML
The "width" attribute of the pre element was deprecated in HTML 4.01.
The "width" attribute of the pre element is not supported in XHTML 1.0 Strict DTD.
Note:--
It is worth noting that while <xmp> is deprecated, the <pre> tag does not perform all of the functions of <xmp>:
<pre><b>Hello</b></pre> displays Hello
<xmp><b>Hello</b></xmp> displays <b>Hello</b>
xmp Tag:-
The tag is used to display the text on the web as it is typed or we can say it is pre formatted text tag..
Syntax:-- <xmp>.. </xmp> Type:-- Conatiner Tag Contains Text Purpose:-- used to preserve spaces and line breals Example:-- <xmp> This text
preserving both spaces and line breaks </xmp> Optional Attributes:-- None
Acronym Tag:-
Syntax:-- <acronym >.. </acronym > Type:-- Conatiner Tag Contains Text Purpose:-- it defines the start of an acronym, like "WWW". By marking up acronyms we can give useful information to browsers, spell checkers, translation systems and search-engine indexers. Example:-- <acronym title="World Wide Web">WWW</acronym> Optional Attributes:-- None
Note:-- we can use <abbr> tag for the same purpose too.
Till now what we have read is all about developing a web page using HTML tags. but when we talk about the site it is collection of many web pages which are interconnected with each other. so HTML provides us an easy way to connect or link two pages.. now let us have a look on these methods or i must say tags.. we have basically two tags for the purpose
<a> and <link> let us discuss them in detail
Anchor Tag:-
Syntax:-- <a>.. </a> Type:-- Container Tag Contains Text Purpose:-- The tag defines an anchor and we can use an anchor in two ways:
1. To create a link to another document by using the href attribute 2. To create a bookmark inside a document, by using the name or id attribute this is used basically when we re writting long documents and want the easy navigation in the document from one topic to other
Example:-- <p>Linking to My profile of DotNetSpider: <a href="http://www.dotnetspider.com/member/meetuchoudhary.aspx"> Meetu Choudhary</a> </p> Optional Attributes:--
1. charset * Values:- character_encoding * Purpose:- Specifies the character encoding of the target URL * Example :--<a href="www.somesite.com" charset="charset">Some text or element</a> * Note:- HTTP documents of type text (such as text/html, text/plain, etc.) can send a charset parameter in the HTTP header to specify the character encoding of the document. According to HTTP 1.1, the default charset is ISO-8859-1. However, many browser use the reader's preferred encoding if there is no explicit charset parameter. The character encoding line in the HTTP letter may look like this: Content-Type: text/html; charset=utf-8 Most common charset values:
+ UTF-8 - UTF-8 is character encoding for Unicode. Can represent any character in the Unicode standard and is compatible with ASCII. + ISO-8859-1 - Standard character encoding of the Latin alphabet
In theory, any character encoding that has been registered with IANA can be used, but no browser understands all of them. The more widely a character encoding is used, the better the chance that a browser will understand it.
1. coords * Values:- if shape="rect" then coords="left,top,right,bottom" if shape="circ" then coords="centerx,centery,radius" if shape="poly" then coords="x1,y1,x2,y2,..,xn,yn" * Purpose:- Specifies the coordinates appropriate to the shape attribute to define the area of an image for image maps where the anchor is to be placed * Example :--<a href="www.somesite.com" coords="bottom" >Some text or element</a> 2. href * Values:- any URL * Purpose:- Specifies the Target URL to the Link * Example :--<a href="www.somesite.com" >Some text or element</a> 3. hreflang * Values:- language_code * Purpose:- Specifies the base language of the target URL * Example :--<a href="www.somesite.com" hreflang="">Some text or element</a> 4. rel or rev * Values:- alternate, stylesheet, start, next, prev, contents, index, glossary, copyright, chapter, section, subsection, appendix, help, bookmark * Purpose:- Specifies the relationship between the current document and the target URL * Example :--<a href="www.somesite.com" rel="stylsheet">Some text or element</a> 5. shape * Values:- rect, rectangle, circ, circle, poly, polygon * Purpose:- Used to defines the type of region to be used for mapping in the current area tag. Used with the coords attribute * Example :--Example :--<a href="www.somesite.com" coords="left" shape="circ">Some text or element</a> 6. Target * Values:- _blank, _parent, _self, _top, framename * Purpose:- Tells the where to open the target URL * Example :--<a href="www.somesite.com" target="_blank">Some text or element</a>
|
No responses found. Be the first to respond and make money from revenue sharing program.
|