<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2264615378200805267</id><updated>2012-01-06T15:04:32.186+05:30</updated><category term='presentational'/><category term='structural element'/><category term='cascade'/><category term='phrase element'/><category term='other'/><category term='selectors'/><category term='deprecated'/><category term='javascript'/><category term='semantic tag'/><category term='attribute'/><category term='internet explorer'/><category term='head tag'/><category term='bugs'/><category term='property'/><category term='non-semantic'/><category term='fonts'/><category term='proprietary'/><category term='block element'/><category term='http'/><category term='nonstandard'/><category term='tables'/><category term='replaced element'/><category term='values'/><category term='inheritance'/><category term='box properties'/><category term='table elements'/><category term='flow element'/><category term='css'/><category term='frames'/><category term='unrendered element'/><category term='text'/><category term='head element'/><category term='html'/><category term='xhtml'/><category term='form control element'/><category term='text properties'/><category term='inline element'/><category term='layout properties'/><category term='ftp'/><title type='text'>Destination-Code - Chetan Crasta's XHTML, HTML and CSS Notes</title><subtitle type='html'>Chetan Crasta's XHTML, HTML and CSS Notes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default?start-index=101&amp;max-results=100'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>166</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8887592837173345998</id><published>2011-01-06T23:35:00.000+05:30</published><updated>2011-01-06T23:35:57.153+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='replaced element'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The img Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;img&lt;/code&gt; element is used to insert an image into an (X)HTML page. It is an inline replaced
 element. It is an empty element. The URI of the image is defined by the &lt;code&gt;src&lt;/code&gt; attribute. Any image format that
 the browser supports can be used. Common formats are JPEG, PNG and GIF.&lt;/p&gt;
 &lt;p&gt;The &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;alt&lt;/code&gt; attributes are required.&lt;/p&gt;
 
 &lt;h4&gt;Attributes&lt;/h4&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;&lt;code&gt;Core Attributes&lt;/code&gt;&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a deprecated attribute. It specifies the alignment of the image.
   Its value can be &lt;code&gt;bottom&lt;/code&gt;, or &lt;code&gt;left&lt;/code&gt;, or &lt;code&gt;middle&lt;/code&gt;, or &lt;code&gt;right&lt;/code&gt;,
   or &lt;code&gt;top&lt;/code&gt;. Since this a presentational attribute, it is preferable to use CSS instead.&lt;/dd&gt;
   &lt;dd&gt;&lt;dl&gt;
   &lt;dt&gt;&lt;code&gt;bottom&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;Aligns the image to the baseline&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;middle&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;Aligns the vertical middle of the image to the baseline&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;top&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;Aligns the top of the image to the top of the line box.&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;left&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;Aligns the image to left edge of the line box&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;right&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;Aligns the image to the right edge of the line box&lt;/dd&gt;
   &lt;/dl&gt;&lt;/dd&gt;
   
   &lt;dt&gt;&lt;code&gt;alt&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This is a required attribute. The value of this attribute is a short description
    of the image. It is displayed when the image cannot be loaded. It may also be used by
    non-visual browsers.&lt;/dd&gt;
    
   &lt;dt&gt;&lt;code&gt;border&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This is a deprecated attribute. Its value is a number
    that specifies the width of the border in pixels that surrounds the image.
    Since this is a presentational attribute, it is preferable to use the CSS 
    &lt;code&gt;border&lt;/code&gt; property instead.&lt;/dd&gt;
    
   &lt;dt&gt;&lt;code&gt;height&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This attribute specifies the height of the image. Using this attribute
    may speed up the rendering of the page because the browser can allocate space
    for the image before it is fully loaded. Since this is a presentational attribute, 
    it is preferable to use the CSS 
    &lt;code&gt;height&lt;/code&gt; property instead.&lt;/dd&gt;
    
   &lt;dt&gt;&lt;code&gt;hspace&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This is a deprecated attribute. Its value is a number that specifies the 
    width in pixels of the right and left margins of the image. Since this is a presentational attribute, 
    it is preferable to use the CSS 
    &lt;code&gt;margin&lt;/code&gt; property instead.&lt;/dd&gt;
   
   &lt;dt&gt;&lt;code&gt;ismap&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute takes only one value and is specified as follows: &lt;code&gt;ismap="ismap"&lt;/code&gt;. 
  It indicates that the image is part of an &lt;code&gt;server-side image map&lt;/code&gt;.&lt;/dd&gt;
  
 &lt;dt&gt;&lt;code&gt;longdesc&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;The value of this attribute is a URL to a document that has a description of the 
   image. This will help those who are browsing the document
   non-visually. However, visual browsers such as Firefox, Internet Explorer, etc. do not 
   provide any method to view the document specified in &lt;code&gt;longdesc&lt;/code&gt;.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;name&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute is deprecated in XHTML. It is better to use the &lt;code&gt;id&lt;/code&gt; or
  &lt;code&gt;class&lt;/code&gt; attribute in both HTML and (X)HTML documents.&lt;/dd&gt;
  
 &lt;dt&gt;&lt;code&gt;src&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a required attribute. Its value is the URI of the image that is to be embedded.&lt;/dd&gt;
  
 &lt;dt&gt;&lt;code&gt;usemap&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute is used to specify the &lt;code&gt;map&lt;/code&gt; element that contains the 
  client-side image map information of the iamge. The value of this attribute is the &lt;code&gt;name&lt;/code&gt; 
  (in case of HTML) or the &lt;code&gt;id&lt;/code&gt; (in case of XHTML), prefixed with a hash (#) 
  of the &lt;code&gt;map&lt;/code&gt; element.&lt;/dd&gt;
  
 &lt;dt&gt;&lt;code&gt;vspace&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute. Its value is a number that specifies the 
    width in pixels of the top and bottom margins of the image. Since this is a presentational attribute, 
    it is preferable to use the CSS 
    &lt;code&gt;margin&lt;/code&gt; property instead.&lt;/dd&gt;
    
   &lt;dt&gt;&lt;code&gt;width&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This attribute specifies the width of the image. Using this attribute
    may speed up the rendering of the page because the browser can allocate space
    for the image before it is fully loaded. Since this is a presentational attribute, 
    it is preferable to use the CSS 
    &lt;code&gt;width&lt;/code&gt; property instead.&lt;/dd&gt;
    
  &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8887592837173345998?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8887592837173345998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8887592837173345998' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8887592837173345998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8887592837173345998'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2011/01/img-element.html' title='The img Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4185778296144520726</id><published>2011-01-06T14:52:00.001+05:30</published><updated>2011-01-06T14:56:28.713+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Inline Frames</title><content type='html'>&lt;p&gt;Inline Frames, specified by the &lt;code&gt;iframe&lt;/code&gt; element allow one to display files
  within an (X)HTML document.
 The inserted file can be another (X)HTML document or an image or text file etc. The inserted file,
 specified by the &lt;code&gt;src&lt;/code&gt; attribute, is displayed in a rectangular frame.&lt;/p&gt;
 &lt;p&gt;&lt;code&gt;iframe&lt;/code&gt; is an inline replaced element. It is also a flow element, therefore
 it can have block or inline child elements. The child elements and/or text content of the 
 Inline Frame are displayed by browsers that do not support Inline Frames.&lt;/p&gt;
 &lt;p&gt;Only the transitional doctypes allow Inline Frames.&lt;/p&gt;
 
 &lt;h4&gt;Attributes&lt;/h4&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;&lt;code&gt;Core Attributes&lt;/code&gt;&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute. It specifies the alignment of the Inline Frame within its parent element.
  It can have a value of &lt;code&gt;top&lt;/code&gt;, or &lt;code&gt;middle&lt;/code&gt;, or &lt;code&gt;bottom&lt;/code&gt;, 
  or &lt;code&gt;left&lt;/code&gt;, or &lt;code&gt;right&lt;/code&gt;. Since it is a presentational attribute, CSS should be used
  instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;frameborder&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute can have a value of &lt;code&gt;1&lt;/code&gt; or &lt;code&gt;0&lt;/code&gt; which specifies
  if there should be a border around the frame or not. Since this is a presentational attribute, it
  is preferable to use the CSS border property instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;height&lt;/code&gt; and &lt;code&gt;width&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute can have a number or a percentage value. Number values specify the height (or width) of the
  Inline Frame in pixels and percentage values refer to the height (or width) of the parent element.
  Since this is a presentational attribute, it is preferable to use the CSS &lt;code&gt;height&lt;/code&gt; or 
  &lt;code&gt;width&lt;/code&gt; property instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;longdesc&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;The value of this attribute is a URL to a document that has a description 
  of the content of the Inline Frame. This will help those who are browsing the frameset 
  document non-visually. However, visual browsers such as Firefox, Internet Explorer, etc. 
  do not provide any method to view the document specified in longdesc.&lt;/dd&gt;
  &lt;dd&gt;Example: &lt;code&gt;&amp;lt;iframe src=&amp;quot;fr.html&amp;quot; longdesc=&amp;quot;frdesc.html&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;marginheight&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;The value of this attribute, a number, specifies the top and bottom margins between the displayed
  contents of the source file of the Inline Frame and its inner edge.
  &lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;marginwidth&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;The value of this attribute, a number, specifies the left and right margins between the displayed
  contents of the source file of the Inline Frame and its inner edge.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;name&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute assigns a name to the Inline Frame so that it can be targetted by links having
  the &lt;code&gt;target&lt;/code&gt; attribute.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;scrolling&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This attribute can take one of these values: &lt;code&gt;yes&lt;/code&gt;,&lt;code&gt;no&lt;/code&gt; or &lt;code&gt;auto&lt;/code&gt;.
   With &lt;code&gt;yes&lt;/code&gt;, scrollbars are always show whether they are needed or not. With &lt;code&gt;no&lt;/code&gt;,
    scrollbars are never shown. With &lt;code&gt;auto&lt;/code&gt;, scrollbars are shown when needed, 
    this is the default.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;src&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;The value of this attribute is a URL that specifies the initial file that will be displayed in the frame. 
  The &lt;code&gt;src&lt;/code&gt; attribute can refer to any file, even to another frameset document.&lt;/dd&gt;
  &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4185778296144520726?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4185778296144520726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4185778296144520726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4185778296144520726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4185778296144520726'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/inline-frames.html' title='Inline Frames'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7611179164100585440</id><published>2011-01-06T01:05:00.001+05:30</published><updated>2011-01-06T01:05:51.489+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='non-semantic'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The i Element</title><content type='html'>&lt;p&gt;This element causes its text content to be displayed in italics. It is an inline element.
 It is a non-semantic, purely presentational element, therefore its use is discouraged.
 When italics are needed for emphasis, the &lt;code&gt;em&lt;/code&gt; or &lt;code&gt;strong&lt;/code&gt; element should be used
 with the presentation handled by CSS.&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;&lt;code&gt;Core Attributes&lt;/code&gt;&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt; 
  &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7611179164100585440?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7611179164100585440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7611179164100585440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7611179164100585440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7611179164100585440'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2011/01/i-element.html' title='The i Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3964470958211561414</id><published>2011-01-06T00:55:00.001+05:30</published><updated>2011-01-06T00:59:21.684+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The html Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;html&lt;/code&gt; element is topmost in the hierarchy of (X)HTML elements and is known as 
 the &lt;dfn&gt;root&lt;/dfn&gt; element. 
 Therefore all (X)HTML elements are descendants of the &lt;code&gt;html&lt;/code&gt; element. The &lt;code&gt;html&lt;/code&gt;
 element appears after the Document Type Declaration.&lt;/p&gt;
 &lt;p&gt;The &lt;code&gt;head&lt;/code&gt; and the &lt;code&gt;body&lt;/code&gt; elements, and, in the case of a Frameset document, the 
 &lt;code&gt;frameset&lt;/code&gt; element are the only child elements of &lt;code&gt;html&lt;/code&gt;.&lt;/p&gt;

 &lt;p&gt;Example: &lt;code style="white-space:pre"&gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt; 
 
 &lt;h4&gt;Attributes&lt;/h4&gt;
 &lt;dl&gt;
     &lt;dt&gt;&lt;code&gt;lang&lt;/code&gt; and &lt;code&gt;xml:lang&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;These attributes specifiy the language of the contents of the document.
    See &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;this page&lt;/a&gt; for more information.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;See &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;this page&lt;/a&gt;.&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;id&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This attribute is used to uniquely name the &lt;code&gt;html&lt;/code&gt; element. It is allowed
    on the &lt;code&gt;html&lt;/code&gt; element only when the doctype is XHTML.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;version&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a deprecated attribute. Its value is the Formal Public Identifier of the HTML
   Document Type Definition (DTD) of the document. This attribute should not be used because the DTD of the 
   document is specified in the doctype.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;xmlns&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a required attribute in XHTML documents. It specifies the XML namespace of the document.&lt;/dd&gt;
 &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3964470958211561414?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3964470958211561414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3964470958211561414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3964470958211561414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3964470958211561414'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_06.html' title='The html Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8839627258527662533</id><published>2011-01-06T00:10:00.000+05:30</published><updated>2011-01-06T00:10:09.608+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The hr Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;hr&lt;/code&gt; element creates a horizontal rule. It is a block element.
 It is an empty element, that is,
 it cannot contain any other element or text. This is a presentational (X)HTML element.
 Therefore, it is preferable to use CSS borders to create horizontal rules instead of using the
 &lt;code&gt;hr&lt;/code&gt; element.&lt;/p&gt;
 
 &lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
 &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;&lt;code&gt;Core Attributes&lt;/code&gt;&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt; 
 &lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute. It can take the value &lt;code&gt;center&lt;/code&gt; or &lt;code&gt;left&lt;/code&gt; 
  or &lt;code&gt;right&lt;/code&gt;. This attribute is used to align the horizontal rule when its length is less
  than the content area of its parent element. Since it is a presentational attribute, CSS should be
  used instead.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;noshade&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute.
  This attribute is specified as &lt;code&gt;noshade="noshade"&lt;/code&gt;. It displays the rule with one solid
  color, instead of the default 3D shade.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;size&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute. Its value, a number, specifies the height (thickness) of the rule.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;width&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is a deprecated attribute. Its value is a number or a percentage. If the value is a
 number, it specifies the width (length) of the rule in pixels. If the value is a percentage, it calculates the
  the width (length) of the rule as a percentage of the width of the parent element.&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8839627258527662533?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8839627258527662533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8839627258527662533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8839627258527662533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8839627258527662533'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/tag.html' title='The hr Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-908269643602926989</id><published>2011-01-05T22:44:00.003+05:30</published><updated>2011-01-06T00:52:56.987+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='head tag'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The head Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;head&lt;/code&gt; element contains information that describes the (X)HTML document.
 This information is not considered part of the content
 of an (X)HTML page and is therefore not displayed in the 
 viewport.&lt;/p&gt;
 &lt;p&gt;The &lt;code&gt;head&lt;/code&gt; element must contain one &lt;code&gt;title&lt;/code&gt; element.&lt;/p&gt;
 &lt;p&gt;These are the elements that &lt;code&gt;head&lt;/code&gt; can contain:&lt;/p&gt;
 &lt;ul&gt;
  &lt;li&gt;&lt;code&gt;title&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;base&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;meta&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;script&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;link&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;style&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;object&lt;/code&gt;&lt;/li&gt; 
 &lt;/ul&gt;
 &lt;p&gt;There can be only one &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;base&lt;/code&gt; element. However,
 the other elements can be present multiple times.&lt;/p&gt;
 
 &lt;h4&gt;Attributes&lt;/h4&gt;
  &lt;dl&gt;
   &lt;dt&gt;&lt;code&gt;lang&lt;/code&gt; and &lt;code&gt;xml:lang&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;These attributes specifiy the language of the contents of the &lt;code&gt;head&lt;/code&gt; 
    element. However, this attribute is more often specified for the &lt;code&gt;html&lt;/code&gt; element.
    See &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;this page&lt;/a&gt; for more information.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;See &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;this page&lt;/a&gt;.&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;id&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;This attribute is used to uniquely name the &lt;code&gt;head&lt;/code&gt; element. It is allowed
    on the &lt;code&gt;head&lt;/code&gt; element only when the doctype is XHTML.&lt;/dd&gt;
   &lt;dt&gt;&lt;code&gt;profile&lt;/code&gt;&lt;/dt&gt;
    &lt;dd&gt;The value of this attribute is the URI of a document that provides more information of the &lt;code&gt;meta&lt;/code&gt; 
    element's &lt;code&gt;content&lt;/code&gt; attribute.&lt;/dd&gt;
  &lt;/dl&gt;
 &lt;p&gt;Here is the W3.org's &lt;a href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-HEAD" &gt;HTML 4&lt;/a&gt;
   specification page for the &lt;code&gt;head&lt;/code&gt; element.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-908269643602926989?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/908269643602926989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=908269643602926989' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/908269643602926989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/908269643602926989'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag.html' title='The head Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7662230786325223707</id><published>2011-01-04T17:18:00.000+05:30</published><updated>2011-01-04T17:18:39.656+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The h1, h2, h3, h4, h5 and h6 Elements</title><content type='html'>&lt;p&gt;The &lt;code&gt;h1&lt;/code&gt;, &lt;code&gt;h2&lt;/code&gt;, 
 &lt;code&gt;h3&lt;/code&gt;, &lt;code&gt;h4&lt;/code&gt;, &lt;code&gt;h5&lt;/code&gt; and &lt;code&gt;h6&lt;/code&gt; elements are used on headings.
 A &lt;dfn&gt;heading&lt;/dfn&gt; is a short description of the document section it is in. Since a document can have many 
 headings and sub-headings, HTML provides six elements from &lt;code&gt;h1&lt;/code&gt; to &lt;code&gt;h6&lt;/code&gt;. 
 &lt;code&gt;h1&lt;/code&gt; is at the top most of the hierarchy and &lt;code&gt;h6&lt;/code&gt; is at the lowest.&lt;/p&gt;
 &lt;p&gt;These are block elements that can only have inline elements as their child elements.&lt;/p&gt;
 &lt;p&gt;Since the various heading elements are used to indicate a hierarchy of headings and content, 
 it doesn't make sense to skip levels. For example, after an &lt;code&gt;h1&lt;/code&gt; element, the 
 next heading element should be &lt;code&gt;h2&lt;/code&gt; not any other heading element like &lt;code&gt;h3&lt;/code&gt;.&lt;/p&gt;
 &lt;p&gt;An heading element can contain an image if the image's content describes the content of the 
 document section.&lt;/p&gt;
 
 &lt;h5&gt;Attributes&lt;/h5&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;&lt;code&gt;Core Attributes&lt;/code&gt;&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a deprecated attribute. It can take as values either &lt;code&gt;center&lt;/code&gt;,
   &lt;code&gt;left&lt;/code&gt;, and &lt;code&gt;right&lt;/code&gt;. The CSS property &lt;code&gt;text-align&lt;/code&gt; should be used instead of this property.&lt;/dd&gt;
  &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7662230786325223707?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7662230786325223707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7662230786325223707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7662230786325223707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7662230786325223707'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/heading-elements.html' title='The h1, h2, h3, h4, h5 and h6 Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7344138832988636853</id><published>2011-01-03T17:29:00.002+05:30</published><updated>2011-03-24T18:18:45.858+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='frames'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The frameset, frame, and noframes Elements</title><content type='html'>&lt;p&gt;With &lt;dfn&gt;HTML frames&lt;/dfn&gt; one can display multiple HTML documents at once. 
 Each HTML document is displayed in a &lt;code&gt;frame&lt;/code&gt;. A &lt;dfn&gt;frame&lt;/dfn&gt; 
 is created using the &lt;code&gt;frame&lt;/code&gt; element and usually occupies only a part of 
 the viewport. The &lt;code&gt;frame&lt;/code&gt; elements are contained within a 
 &lt;code&gt;frameset document&lt;/code&gt;. A &lt;dfn&gt;frameset document&lt;/dfn&gt; specifies the 
 dimensions and layout of the frames. A frameset document uses a frameset 
 doctype:&lt;/p&gt;
 &lt;dl&gt;
  &lt;dt&gt;HTML 4.01 Frameset Document Type Definition&lt;/dt&gt;
   &lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Frameset//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/frameset.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
  &lt;dt&gt;XHTML 1.0 Frameset Document Type Definition&lt;/dt&gt;
   &lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Frameset//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt; 
 &lt;/dl&gt; 
 &lt;p&gt;Instead of the &lt;code&gt;body&lt;/code&gt; element, a frameset document contains 
 the &lt;code&gt;frameset&lt;/code&gt; element. This frameset element can contain the 
 &lt;code&gt;frame&lt;/code&gt; element, the &lt;code&gt;noframes&lt;/code&gt; element or even more
 &lt;code&gt;frameset&lt;/code&gt; elements.&lt;/p&gt;
 
 &lt;h4&gt;The &lt;code&gt;frameset&lt;/code&gt; Element&lt;/h4&gt;
 
 &lt;p&gt;This element is the container for the frame elements of a frames document. In a framset document,
 it takes the place of the &lt;code&gt;body&lt;/code&gt; element. 
 Frameset elements can be nested within each other. Therefore, a &lt;code&gt;frameset&lt;/code&gt;
 can contain both &lt;code&gt;frame&lt;/code&gt; elements and &lt;code&gt;frameset&lt;/code&gt; elements.&lt;/p&gt;
 
 &lt;p&gt;Example 1: &lt;code style="white-space:pre"&gt;
 &amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Frameset//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/frameset.dtd&amp;quot;&amp;gt;
 &amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
  &amp;lt;head&amp;gt;
   &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;
   &amp;lt;title&amp;gt;A Frames Document&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;frameset rows=&amp;quot;100,*&amp;quot;&amp;gt;
   &amp;lt;frame src=&amp;quot;logo.html&amp;quot;&amp;gt;
   &amp;lt;frameset cols=&amp;quot;200px,*&amp;quot;&amp;gt;
    &amp;lt;frame src=&amp;quot;nav.html&amp;quot;&amp;gt;
    &amp;lt;frame src=&amp;quot;content.html&amp;quot;&amp;gt;
   &amp;lt;/frameset&amp;gt;  
  &amp;lt;/frameset&amp;gt;
 &amp;lt;/html&amp;gt;  
 &lt;/code&gt;&lt;/p&gt;
 
 &lt;h5&gt;Attrbutes&lt;/h5&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;cols&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;&lt;p&gt;The value of this attribute is a comma-separated list of numbers, and/or percentages, and/or relative lengths.
    This attribute specifies the number of columns and their widths.
   &lt;/p&gt;
   &lt;dl&gt;
    &lt;dt&gt;Number values&lt;/dt&gt;
     &lt;dd&gt;Number values specify the widths of the columns in pixels. 
     Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;200,400,200&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt; 
    &lt;dt&gt;Percentage Values&lt;/dt&gt;
     &lt;dd&gt;These specify the width of the columns as a percentage of the width of the viewport. 
     Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;20%,70%,10%&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
    &lt;dt&gt;Relative Length Values&lt;/dt&gt;
     &lt;dd&gt;&lt;dl style="margin-top:0;padding-top:0;"&gt;&lt;dt&gt;An asterisk (*) specifies that the column should use all the available space.&lt;/dt&gt;
     &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;100px,70%,*&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
     &lt;dt&gt;Asterisks that are prefixed with numbers are used to specify ratios.&lt;/dt&gt;
     &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;2*,7*,*&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
     &lt;dt&gt;In the above example, the ratio of the widths of the three columns are 2:7:1.&lt;/dt&gt;
     &lt;dd&gt;Relative length values are useful when used together with number values, because they allow one 
     to relatively divide the space remaining after allocating a fixed number of pixels.&lt;/dd&gt;
     &lt;dt&gt;Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;200,5*,2*&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;
   &lt;/dl&gt;
  &lt;dt&gt;&lt;code&gt;rows&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This takes the same values as &lt;code&gt;cols&lt;/code&gt;, but specifies the height of rows.&lt;/dd&gt;
   &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frameset rows=&amp;quot;200,400,200&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
   &lt;dd&gt;The &lt;code&gt;rows&lt;/code&gt; and &lt;code&gt;cols&lt;/code&gt; attributes can be used together to specify 
   both rows and columns in a frameset.&lt;/dd&gt;
   &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frameset cols=&amp;quot;100,200&amp;quot; rows=&amp;quot;50%,50%&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
   
  &lt;dt&gt;&lt;code&gt;border&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a nonstandard attribute. Its value is a number. This number is the pixel width of the frame
   borders. A value of zero removes the frame borders.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;bordercolor&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a nonstandard attribute. The value of this attribute is a color name or a hexadecimal notation color value. Opera does not 
   support this attribute.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;frameborder&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;&lt;p&gt;This is a nonstandard attribute. However, this attribute is standard on the 
   &lt;code&gt;frame&lt;/code&gt; element. Therefore, it is preferable not to use this attribute on the 
   &lt;code&gt;frameset&lt;/code&gt; element.&lt;/p&gt;
   &lt;p&gt;The value of this attribute can be &lt;code&gt;1&lt;/code&gt; or &lt;code&gt;yes&lt;/code&gt; to display the borders,
   or &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;no&lt;/code&gt; to hide the borders. Opera does not support this attribute.&lt;/p&gt;&lt;/dd&gt;
   &lt;/dl&gt;   

 &lt;h4&gt;The &lt;code&gt;frame&lt;/code&gt; Element&lt;/h4&gt;
  &lt;p&gt;The &lt;code&gt;frame&lt;/code&gt; element is used to specify the initial source file of a frame in a frameset.
  This is an empty element. Apart from the initial file, the attributes of this element specify the presentation, behavior and 
  semantics of the frame.&lt;/p&gt;
  
  
 &lt;h5&gt;Attrbutes&lt;/h5&gt;
 &lt;dl&gt; 
  &lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt; 
   &lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
  &lt;dt&gt;src&lt;/dt&gt;
   &lt;dd&gt;The value of this attribute is a URL that specifies the initial file that will be 
   displayed in the frame.
   The &lt;code&gt;src&lt;/code&gt; attribute can refer to any file, even to another frameset document. 
   &lt;/dd&gt;
   &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frame src=&amp;quot;../folder/file.html&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;bordercolor&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a nonstandard attribute. This attribute specifies the color of the frames borders.
   The &lt;code&gt;bordercolor&lt;/code&gt; specified on the &lt;code&gt;frame&lt;/code&gt; element overrides the
   color specified by &lt;code&gt;bordercolor&lt;/code&gt; on the parent &lt;code&gt;frameset&lt;/code&gt; element.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;frameborder&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This is a nonstandard attribute. The value of this attribute can be &lt;code&gt;1&lt;/code&gt; or &lt;code&gt;yes&lt;/code&gt; to display the borders,
   or &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;no&lt;/code&gt; to hide the borders. Opera does not support this attribute. 
   &lt;strong&gt;The value of this attribute on the &lt;code&gt;frame&lt;/code&gt; element 
   does not override the value specified on the &lt;code&gt;frameset&lt;/code&gt; element.&lt;/strong&gt;&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;longdesc&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;The value of this attribute is a URL to a document that has a description of the 
   content of the frame. This will help those who are browsing the frameset document
   non-visually. However, visual browsers such as Firefox, Internet Explorer, etc. do not 
   provide any method to view the document specified in &lt;code&gt;longdesc&lt;/code&gt;.&lt;/dd&gt;
   &lt;dd&gt;Example: &lt;code&gt;&amp;lt;frame src=&amp;quot;fr.html&amp;quot; longdesc=&amp;quot;frdesc.html&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;marginheight&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This specifies the top and bottom margin between the inside edge of a frame and its contents.
   It is a number value, which specifies the margin in pixels. The value has to
   be a positive number and greater than zero.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;marginwidth&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This specifies the left and right margin between the inside edge of a frame and its contents.
   It is a number value, which specifies the margin in pixels. The value has to
   be a positive number and greater than zero.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;name&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This attribute is used to name a frame. It allows links in one frame to load documents
   into another using the &lt;code&gt;target&lt;/code&gt; attribute on &lt;code&gt;a&lt;/code&gt; elements.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;noresize&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This attribute can have only one value, like this: &lt;code&gt;noresize="noresize"&lt;/code&gt;.
   When this attribute is present, it prevents the user from resizing the frame. Note that 
   in a three-column or three-row layout, setting &lt;code&gt;noresize="noresize"&lt;/code&gt; on the middle
   column or row prevents resizing of all the columns or rows.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;scrolling&lt;/code&gt;&lt;/dt&gt;
   &lt;dd&gt;This attribute can take one of these values: &lt;code&gt;yes&lt;/code&gt;,&lt;code&gt;no&lt;/code&gt; or &lt;code&gt;auto&lt;/code&gt;.
   With &lt;code&gt;yes&lt;/code&gt;, scrollbars are always show whether they are needed or not. With &lt;code&gt;no&lt;/code&gt;, 
   scrollbars are never shown. With &lt;code&gt;auto&lt;/code&gt;, scrollbars are shown when needed, this is the default.&lt;/dd&gt;
 &lt;/dl&gt;

&lt;h4&gt;The &lt;code&gt;noframes&lt;/code&gt; Element&lt;/h4&gt;
 &lt;p&gt;This is a block element whose contents are displayed only in browsers that do not
 support frames or have frames disabled. This element usually appears as the last child of &lt;code&gt;frameset&lt;/code&gt;. 
 &lt;code&gt;noframes&lt;/code&gt; is a flow element and can therefore contain 
 both block and inline elements.&lt;/p&gt;
 &lt;p&gt;In an XHTML frameset document, this element must contain the &lt;code&gt;body&lt;/code&gt;
 element. In an HTML frameset document, &lt;code&gt;body&lt;/code&gt; is an optional child element.&lt;/p&gt;

&lt;h4&gt;Nesting Framesets&lt;/h4&gt;
 &lt;p&gt;Frames can be nested in each other. There are two ways of doing this:&lt;/p&gt;
 &lt;dl&gt;  
  &lt;dt&gt;Putting a frameset document in a frame&lt;/dt&gt;
   &lt;dd&gt;A frameset document can be specified in the &lt;code&gt;src&lt;/code&gt; attribute of 
   the &lt;code&gt;frame&lt;/code&gt; tag.&lt;/dd&gt;
   &lt;dd&gt;&lt;dl&gt;
&lt;dt&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/SJB-40EwhjI/AAAAAAAAAFk/lIxf0HcgvrI/s1600-h/nested+frames.GIF"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SJB-40EwhjI/AAAAAAAAAFk/lIxf0HcgvrI/s320/nested+frames.GIF" alt="" id="BLOGGER_PHOTO_ID_5228818681893520946" border="0" /&gt;&lt;/a&gt;&lt;dt&gt;   
   &lt;dd&gt;The image above shows how a nested-frame webpage looks.&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;
   &lt;dd&gt;There is one major disadvantage to this method: 
   The nested frameset is independent of the parent frameset. 
   Therefore, the nested frames cannot be targeted by links in the parent frameset frames.&lt;/dd&gt;

  &lt;dt&gt;Nesting &lt;code&gt;frameset&lt;/code&gt; Elements&lt;/dt&gt;
  &lt;dd style="margin-left:0;padding-left:0"&gt;&lt;code style="white-space:pre"&gt;&amp;lt;frameset cols=&amp;quot;18%,64%,18%&amp;quot;&amp;gt;
 &amp;lt;frame src=&amp;quot;mefra1.html&amp;quot; name=&amp;quot;navigation&amp;quot; noresize=&amp;quot;noresize&amp;quot; /&amp;gt;
 &amp;lt;frameset rows=&amp;quot;18%,64%,18%&amp;quot;&amp;gt;
  &amp;lt;frame src=&amp;quot;header.html&amp;quot; /&amp;gt;
  &amp;lt;frame src=&amp;quot;all_tags.html&amp;quot; name=&amp;quot;content&amp;quot; scrolling=&amp;quot;yes&amp;quot; /&amp;gt;
  &amp;lt;frame src=&amp;quot;footer.html&amp;quot; /&amp;gt;
 &amp;lt;/frameset&amp;gt;
 &amp;lt;frame src=&amp;quot;mefra3.html&amp;quot; name=&amp;quot;copyright&amp;quot; title=&amp;quot;copyright&amp;quot; /&amp;gt;
 &amp;lt;/frameset&amp;gt;&lt;/code&gt;&lt;/dd&gt;
  
  &lt;dd&gt;There is no difference in the appearance of the nested frameset document using either of the two methods.
  The difference is all frames - nested and otherwise - can be targeted by links anywhere in the document.
  Therefore, this method is superior to the first method.&lt;/dd&gt;
 &lt;/dl&gt;
 
 &lt;h4&gt;Problems with frames&lt;/h4&gt;
 
 &lt;dl&gt;
 &lt;dt&gt;Bookmarking&lt;/dt&gt;
  &lt;dd&gt;When browsing a frameset, the URL in the address bar never changes. 
  This is because new web pages load within the frames of the frameset. 
  Therefore, if you click a link in any of the frames of a website and then bookmark it, 
  you bookmark only the URL of the frameset (the URL displayed in the address bar). 
  You cannot return to the page you were looking at using the bookmark.&lt;/dd&gt;
 &lt;dt&gt;Linking&lt;/dt&gt;
  &lt;dd&gt;With plain HTML and CSS, it is not possible for a link to load
   a frameset along with specific pages in its frames. A link can load a frameset, 
   which will always load its default pages into its frames.
    Search engine users who arrive at a page on a website using frames will only see a single page
    of a frame, not the frames page within its frameset.&lt;/dd&gt;
 &lt;dt&gt;Latency&lt;/dt&gt;
  &lt;dd&gt;Framesets are slow to load because many files have to be downloaded to fill up one screen. 
  Each HTML file requires an HTTP request to be sent, this makes framesets much slower than ordinary web pages.&lt;/dd&gt;
 &lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7344138832988636853?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7344138832988636853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7344138832988636853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7344138832988636853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7344138832988636853'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/frames-and.html' title='The frameset, frame, and noframes Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/SJB-40EwhjI/AAAAAAAAAFk/lIxf0HcgvrI/s72-c/nested+frames.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8136130245972918770</id><published>2010-12-21T22:35:00.000+05:30</published><updated>2010-12-21T22:35:13.972+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The form Element</title><content type='html'>&lt;p&gt;A form is a section of a document that contains blank areas that can be filled by a user and submitted to be processed. In (X)HTML the &lt;code&gt;form&lt;/code&gt; element is used to create a form. It contains various &lt;code&gt;form controls&lt;/code&gt;. It is a block element and can have only block elements and the &lt;code&gt;script&lt;/code&gt; element as children. &lt;code&gt;form&lt;/code&gt; elements cannot be nested within each other.&lt;/p&gt;
&lt;p&gt;These are the allowed child elements of &lt;code&gt;form&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;code&gt;p&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;h1&lt;/code&gt; to &lt;code&gt;h6&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;ul&lt;/code&gt; and &lt;code&gt;ol&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;pre&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;dl&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;div&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;noscript&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;blockquote&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;hr&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;table&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;fieldset&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;address&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;script&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;accept&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The value of this attribute is a comma-separated list of MIME types which the server can process. Browsers should not allow a user to upload files of a type that is not listed. However, none of the major browsers support this feature.&lt;p&gt;&lt;p&gt;Example: &lt;code&gt;&amp;lt;form action=&amp;quot;&amp;quot; accept=&amp;quot;image/gif, image/jpeg&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;accept-charset&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute specifies the character encodings of the user input that the form processing server must accept in order to process the form. The value of this attribute is a comma-separated or space-separated list of IS0 character set names. The default value is &lt;code&gt;unknown&lt;/code&gt;, which the browser will interpret as the same character encoding that the page that contains the form is in. Based on this attribute, a browser may restrict the characters that are entered by the user in the form. However, none of the major browsers impose this restriction. The character encoding of the user input can be any &lt;strong&gt;one&lt;/strong&gt; of those that are listed in the &lt;code&gt;accept-charset&lt;/code&gt; attribute.&lt;/p&gt;&lt;p&gt;Here is a list of character encodings &lt;a href="http://www.w3schools.com/TAGS/ref_charactersets.asp"&gt;http://www.w3schools.com/TAGS/ref_charactersets.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;form action=&amp;quot;&amp;quot; accept-charset=&amp;quot;ISO-8859-1,ISO-8859-2&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;action&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This is a required attribute. Its value is the URL of the web page or application that will process the form. If the value is left blank, then the browser submits the form to the current page.&lt;/p&gt;&lt;p&gt;Example: &lt;code&gt;&amp;lt;form action=&amp;quot;contact.php&amp;quot;&amp;gt;&amp;hellip;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;enctype&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute specifies the content type used to submit the form to the server when the form uses &lt;code&gt;post&lt;/code&gt; to submit the form to the server (&lt;code&gt;method=post&lt;/code&gt;). There are three possible values for the &lt;code&gt;enctype&lt;/code&gt; attribute:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;application/x-www-form-urlencoded&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This is the default content type for &lt;code&gt;post&lt;/code&gt; and the only encoding of &lt;code&gt;get&lt;/code&gt;. With URL encoding, and the &lt;code&gt;get&lt;/code&gt; method, the following ASCII characters get encoded as shown in the table:&lt;/p&gt;
 &lt;table border="1"&gt;
  &lt;tr&gt;&lt;th&gt;Symbol&lt;/th&gt;&lt;th&gt;URL-Encoded&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;space&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;@&lt;/td&gt;&lt;td&gt;%40&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;%23&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;$&lt;/td&gt;&lt;td&gt;%24&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;%&lt;/td&gt;&lt;td&gt;%25&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&amp;amp;&lt;/td&gt;&lt;td&gt;%26&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;%2B&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;%3D&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;:&lt;/td&gt;&lt;td&gt;%3A&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;;&lt;/td&gt;&lt;td&gt;%3B&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;,&lt;/td&gt;&lt;td&gt;%2C&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;?&lt;/td&gt;&lt;td&gt;%3F&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;/&lt;/td&gt;&lt;td&gt;%2F&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
&lt;p&gt;If the method is &lt;code&gt;post&lt;/code&gt;, in addition to the above mentioned characters, the following characters are encoded:&lt;/p&gt;
 &lt;table border="1"&gt;
  &lt;tr&gt;&lt;th&gt;Symbol&lt;/th&gt;&lt;th&gt;URL-Encoded&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;~&lt;/td&gt;&lt;td&gt;%7E&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;`&lt;/td&gt;&lt;td&gt;%60&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;!&lt;/td&gt;&lt;td&gt;%21&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;^&lt;/td&gt;&lt;td&gt;%5E&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;(&lt;/td&gt;&lt;td&gt;%28&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;)&lt;/td&gt;&lt;td&gt;%29&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;|&lt;/td&gt;&lt;td&gt;%7C&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;\&lt;/td&gt;&lt;td&gt;%5C&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;{&lt;/td&gt;&lt;td&gt;%7B&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;[&lt;/td&gt;&lt;td&gt;%5B&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;}&lt;/td&gt;&lt;td&gt;%7D&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;]&lt;/td&gt;&lt;td&gt;%5D&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&amp;quot;&lt;/td&gt;&lt;td&gt;%22&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&amp;lt;&lt;/td&gt;&lt;td&gt;%3C&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;,&lt;/td&gt;&lt;td&gt;%2C&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&amp;gt;&lt;/td&gt;&lt;td&gt;%3E&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;text/plain&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This encoding only converts spaces to "+" characters. This value has an effect only for &lt;code&gt;post&lt;/code&gt; requests. &lt;code&gt;get&lt;/code&gt; requests are URL-encoded regardless of the &lt;code&gt;enctype&lt;/code&gt; value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;multipart/form-data&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This Content Type is required when the form has a file upload form control. With this value, the form data is not encoded at all.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;method&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute specifies the method that will be used to submit the form data. It can take the following values:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;get&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This is the default when there is no &lt;code&gt;method&lt;/code&gt; attribute or when it is blank. With &lt;code&gt;get&lt;/code&gt;, a question mark (?) is appended to the end of the URL of the form application and then the form data is appended. The form data consists of the value of the &lt;code&gt;name&lt;/code&gt; attribute followed by an equals sign and the data of the form control. Subsequent name-value pairs are separated by ampersands (&amp;). The value of the form controls are URL-encoded.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;post&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;With this method the form data is sent as an HTTP &lt;code&gt;post&lt;/code&gt; request. When the &lt;code&gt;enctype&lt;/code&gt; is &lt;code&gt;application/x-www-form-urlencoded&lt;/code&gt;, the form data is encoded as described earlier. When the &lt;code&gt;enctype&lt;/code&gt; is &lt;code&gt;text/plain&lt;/code&gt; the data is not encoded except for the space character which is encoded as the plus (+) character. When the &lt;code&gt;enctype&lt;/code&gt; is &lt;code&gt;multipart/form-data&lt;/code&gt;, the form data is not encoded at all.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;target&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Transitional DTDs allow the &lt;code&gt;form&lt;/code&gt; tag to have the &lt;code&gt;target&lt;/code&gt; attribute. With this attribute, you can specify the name of the window in which the form result should open.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;target&lt;/code&gt; attribute is also useful in frame documents. Using this attribute, a form in one frame can show its results in another.&lt;/p&gt;

&lt;h5&gt;Special Targets&lt;/h5&gt;
&lt;p&gt;There are four special &lt;code&gt;target&lt;/code&gt; values:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;_blank&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This target causes the form results to always open in a new window. The new window will not have an internal name.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;_self&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This target causes the form results to always load in the same window or frame as the form. This is the default behavior of forms.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;_parent&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This causes the form results to open in the parent of the document that contains the link. This is useful when using iframes.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;_top&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This causes the form results to open in the topmost frame in the hierarchy.&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8136130245972918770?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8136130245972918770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8136130245972918770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8136130245972918770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8136130245972918770'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/form-element.html' title='The form Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7524773561515221269</id><published>2010-12-13T23:49:00.002+05:30</published><updated>2010-12-17T19:25:31.003+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The font Element</title><content type='html'>&lt;p&gt;This is a deprecated element that was formerly used to specify the font-family, font size, and the color of the text within it. The CSS properties &lt;code&gt;font&lt;/code&gt;, &lt;code&gt;font-family&lt;/code&gt;, &lt;code&gt;font-size&lt;/code&gt;, and &lt;code&gt;color&lt;/code&gt; should be used instead of the &lt;code&gt;font&lt;/code&gt; element.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The core attributes can be applied to this element.&lt;/dd&gt;
&lt;dt&gt;color&lt;/dt&gt;
&lt;dd&gt;The color of the text can be specified in hexadecimal notation or by color name.&lt;/dd&gt;
&lt;dt&gt;face&lt;/dt&gt;
&lt;dd&gt;The typeface (font-family) can be specified as a list of comma separated names.&lt;/dd&gt;
&lt;dt&gt;size&lt;/dt&gt;
&lt;dd&gt;A number between 1 and 7.&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7524773561515221269?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7524773561515221269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7524773561515221269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7524773561515221269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7524773561515221269'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/12/font-element.html' title='The font Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-966797982073240439</id><published>2010-11-23T15:27:00.000+05:30</published><updated>2010-11-23T15:27:30.386+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='flow element'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The fieldset and legend Elements</title><content type='html'>&lt;p&gt;The &lt;code&gt;fieldset&lt;/code&gt; element is used to group related form elements together. It is a block element. Therefore its parent elements can be &lt;code&gt;div&lt;/code&gt;, &lt;code&gt;form&lt;/code&gt; etc. It can contain both block and inline elements as child elements. &lt;code&gt;fieldset&lt;/code&gt; elements can be nested within each other.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;legend&lt;/code&gt; element is a required child element of &lt;code&gt;fieldset&lt;/code&gt;. It is an inline element that contains a name for the group of elements contained by &lt;code&gt;fieldset&lt;/code&gt;. A &lt;code&gt;fieldset&lt;/code&gt; element can contain only one &lt;code&gt;legend&lt;/code&gt; element.&lt;/p&gt;

&lt;p&gt;Example: &lt;code style="white-space:pre-wrap"&gt;
&amp;lt;form action=&amp;quot;&amp;quot;&amp;gt;
 &amp;lt;p&amp;gt;One form Element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test1&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;Two form element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test2&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;Three form element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test3&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;

 &amp;lt;fieldset&amp;gt;
  &amp;lt;legend&amp;gt;test 2&amp;lt;/legend&amp;gt; 
  &amp;lt;p&amp;gt;Oneone form element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test21&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;Onetwo form element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test22&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;Onethree form element: &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;test23&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;/fieldset&amp;gt;
 
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; id=&amp;quot;submit1&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/TOuNGCCwjmI/AAAAAAAAAfc/FfKz8ouE32U/s1600/fieldset.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/__ZdUHId0XUA/TOuNGCCwjmI/AAAAAAAAAfc/FfKz8ouE32U/s320/fieldset.png" width="179" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;The above image shows how the code is rendered in Firefox. Note how the text of the &lt;code&gt;legend&lt;/code&gt; element appears at the top left side of the grouped form elements.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-966797982073240439?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/966797982073240439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=966797982073240439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/966797982073240439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/966797982073240439'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/tag_22.html' title='The fieldset and legend Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__ZdUHId0XUA/TOuNGCCwjmI/AAAAAAAAAfc/FfKz8ouE32U/s72-c/fieldset.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-6799733176431665044</id><published>2010-09-16T20:23:00.003+05:30</published><updated>2010-12-29T20:08:42.603+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='internet explorer'/><category scheme='http://www.blogger.com/atom/ns#' term='proprietary'/><title type='text'>Internet Explorer Conditional Comments</title><content type='html'>&lt;p&gt;With Internet Explorer Conditional Comments, one can hide HTML code from Internet Explorer, or reveal code only to Internet Explorer. The conditional comment code consists of Internet Explorer's proprietary code within HTML comments. Since the proprietary code is within conditional comments, it is hidden from all other browsers. IE Conditional Comments does not cause a page to become invalid.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&lt;br&gt;&amp;lt;!--[if IE]&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;You are an Internet Explorer user.&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the &lt;code&gt;p&lt;/code&gt; element only appears in Internet Explorer. All other browsers treat the entire piece of code as an HTML comment.&lt;/p&gt;
&lt;p&gt;Specific versions of Internet Explorer or all versions above or below a particular version can be targeted using &lt;dfn&gt;operators&lt;/dfn&gt;&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&lt;br&gt;&amp;lt;!--[if lte IE 7]&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;You are using an outdated version of Internet Explorer.&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, &lt;code&gt;lte&lt;/code&gt; is the operator. It stands for "less than or equal to".&lt;/p&gt;
&lt;p&gt;Here is a list of Operators and their meanings&lt;/p&gt;
&lt;table border="1"&gt;
&lt;tr&gt;&lt;th&gt;Operator&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;!&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The NOT operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if !(IE 9)]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;lt&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The less-than operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;lte&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The less-than-or equal to operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if lte IE 8]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;gt&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The greater-than operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if gt IE 8]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;gte&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The greater-than-or equal to operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if gte IE 8]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The AND operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if (lte IE 8)&amp;(gte IE 6)]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;|&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The OR operator&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;lt;!--[if (IE 8)|(IE 6)]&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;To hide HTML code from Internet Explorer, use the format shown below:&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&lt;br&gt;&amp;lt;!--[if !IE]&amp;gt;&amp;lt;!--&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;You are not using Internet Explorer.&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;!--&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To hide HTML code from only certain versions of Internet Explorer, use the format shown below:&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&lt;br&gt;&amp;lt;!--[if IE 9]&amp;gt;&amp;lt;!--&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;You are using a modern browser.&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;!--&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;More information can be found at &lt;a href="http://msdn.microsoft.com/en-us/library/ms537512(v=VS.85).aspx"&gt;MSDN&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-6799733176431665044?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/6799733176431665044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=6799733176431665044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6799733176431665044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6799733176431665044'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/09/internet-explorer-conditional-comments.html' title='Internet Explorer Conditional Comments'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3166084303008427736</id><published>2010-08-30T22:27:00.000+05:30</published><updated>2010-08-30T22:27:08.392+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='nonstandard'/><title type='text'>The &lt;embed&gt; and &lt;noembed&gt; Elements</title><content type='html'>&lt;p&gt;The &lt;code&gt;embed&lt;/code&gt; element is a non-standard element that is used  
to embed multimedia content into a webpage.
Often, the multimedia content will require browser plugins like 
Flash Player, QuickTime Player etc.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;embed&lt;/code&gt; element is not part of any current 
(X)HTML standard except the unfinalized HTML 5. The recommended element
for embedding media objects is the &lt;code&gt;object&lt;/code&gt; element, which
 is part of the HTML 4.01 and XHTML 1.0 Standard.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;embed&lt;/code&gt; element can have a block or inline parent element.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This attribute can take the values &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, 
&lt;code&gt;top&lt;/code&gt; and &lt;code&gt;bottom&lt;/code&gt;. However, it is perferable to use 
CSS instead of this attribute.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;height&lt;/code&gt; and &lt;code&gt;width&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the height and width of the element. It is perferable to use CSS instead
 of these attributes.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;name&lt;/code&gt; and &lt;code&gt;id&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;These attributes specify a name for the embedded object. However, it is better
 to use only the &lt;code&gt;id&lt;/code&gt; attribute because &lt;code&gt;name&lt;/code&gt; is deprecated
  in XHTML.&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;hidden&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;This attribute can take the values &lt;code&gt;yes&lt;/code&gt; or &lt;code&gt;no&lt;/code&gt;. 
A value of &lt;code&gt;yes&lt;/code&gt; hides the object. This is not a well supported attribute and 
must therefore be avoided.&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;pluginspage&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The value of this attribute is a URL of a page that contains instructions on 
how to download and install the plugin required to render the embedded content.
This attribute is obsolete.&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;hspace&lt;/code&gt; and &lt;code&gt;vspace&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;These attributes were used to specify the amount of horizontal and vertical
 space that should be left clear of the embedded object. It is preferable to use 
CSS instead of these attributes.&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;src&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The value of this attribute is the URL of the file or object to be embedded.&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;type&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The value of this attribute is the MIME type of the embedded object. However, 
the browser can also determine the type of object by the file extension of the file
 specified by &lt;code&gt;src&lt;/code&gt; or by the header sent by the server when the object 
 is accessed.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;HTML 5 allows any other attributes that are specific to the kind of object embedded.&lt;/p&gt;

&lt;h4&gt;The &lt;code&gt;noembed&lt;/code&gt; Element&lt;/h4&gt;
&lt;p&gt;This is a nonstandard child element of the &lt;code&gt;embed&lt;/code&gt; element. It contains 
text, images or objects that are displayed when the embedded object cannot be displayed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3166084303008427736?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3166084303008427736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3166084303008427736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3166084303008427736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3166084303008427736'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/08/and-elements.html' title='The &amp;lt;embed&amp;gt; and &amp;lt;noembed&amp;gt; Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5126835676527687591</id><published>2010-08-03T20:57:00.002+05:30</published><updated>2010-08-30T21:02:24.708+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;em&gt; and &lt;strong&gt; Elements</title><content type='html'>&lt;p&gt;The &lt;code&gt;em&lt;/code&gt; element is used
 to indicate text that is emphasized. All major browsers render 
 emphasized text in italics.&lt;/p&gt;
 
&lt;p&gt;Example 1: &lt;br&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is &amp;lt;em&amp;gt;the&amp;lt;/em&amp;gt; website for web design information.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;The &lt;code&gt;strong&lt;/code&gt; element
 is used to strongly emphasize the enclosed text. All major browsers render
 the text within this element with a boldface font.&lt;/p&gt;

&lt;p&gt;Example 2: &lt;br&gt;&lt;code&gt;&amp;lt;p&amp;gt;This product has a &amp;lt;strong&amp;gt;lifetime&amp;lt;/strong&amp;gt; warranty.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;


&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5126835676527687591?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5126835676527687591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5126835676527687591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5126835676527687591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5126835676527687591'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_1273.html' title='The &amp;lt;em&amp;gt; and &amp;lt;strong&amp;gt; Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5881227497757877525</id><published>2010-08-03T20:35:00.000+05:30</published><updated>2010-08-03T20:35:41.701+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='flow element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;div&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;div&lt;/code&gt; element is used
 to structurally divide a document into sections. A &lt;code&gt;div&lt;/code&gt; 
 contains elements that are semantically related. A &lt;code&gt;div&lt;/code&gt; can 
 contain any element that is normally found in the 
 &lt;code&gt;body&lt;/code&gt; element.&lt;/p&gt; 
&lt;p&gt;A &lt;code&gt;div&lt;/code&gt; is a block-level element. However, it can also contain text and inline child elements.&lt;/p&gt;

&lt;p&gt;A beneficial side effect of grouping semantically 
related elements is they can be styled as one unit using CSS. 
The best way of doing this is by using a &lt;code&gt;div&lt;/code&gt; 
with an &lt;code&gt;id&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt;attribute. 
These attributes are used to identify the 
&lt;code&gt;div&lt;/code&gt; when applying CSS.&lt;/p&gt;

&lt;p&gt;Example: &lt;br&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;body_content&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;p&amp;gt; ... &amp;lt;/p&amp;gt;&lt;br&gt;
...&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;/code&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;align&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute can take the values &lt;code&gt;center&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;, and &lt;code&gt;right&lt;/code&gt;. However, this attribute is deprecated in favor of the CSS &lt;code&gt;text-align&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5881227497757877525?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5881227497757877525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5881227497757877525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5881227497757877525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5881227497757877525'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_07.html' title='The &amp;lt;div&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4602765024912525455</id><published>2010-08-03T19:52:00.000+05:30</published><updated>2010-08-03T19:52:42.926+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The &lt;dir&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;dir&lt;/code&gt; element was originally intended for multi-column
lists. However, this element has now been deprecated. The &lt;code&gt;ul&lt;/code&gt; 
and the &lt;code&gt;ol&lt;/code&gt; elements can be used instead.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4602765024912525455?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4602765024912525455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4602765024912525455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4602765024912525455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4602765024912525455'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/08/element_03.html' title='The &amp;lt;dir&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4184221541540391744</id><published>2010-08-03T19:24:00.000+05:30</published><updated>2010-08-03T19:24:45.975+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;dfn&gt; tag</title><content type='html'>&lt;p&gt;The &lt;code&gt;dfn&lt;/code&gt; element is used to indicate the &lt;dfn&gt;defining instance&lt;/dfn&gt;
  of the special term or phrase. A defining instance is the first occurrence of a term or phrase.&lt;/p&gt;
&lt;p&gt;It is an inline element.&lt;/p&gt;
&lt;p&gt;Most browsers render the enclosed text in italics. However, Chrome and Safari render the text normally.&lt;/p&gt;

&lt;p&gt;Example: &lt;br&gt;&lt;code&gt;&amp;lt;p&amp;gt;The &amp;lt;dfn&amp;gt;386&amp;lt;/dfn&amp;gt; was Intel's first 32-bit processor.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4184221541540391744?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4184221541540391744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4184221541540391744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4184221541540391744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4184221541540391744'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_7952.html' title='The &amp;lt;dfn&amp;gt; tag'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-34097596116088649</id><published>2010-08-03T18:50:00.001+05:30</published><updated>2010-08-03T18:51:07.452+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='flow element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;ins&gt; and &lt;del&gt; Elements</title><content type='html'>&lt;p&gt;These two elements are useful when editing HTML documents.&lt;/p&gt;
&lt;dl&gt;
 &lt;dt&gt;The &lt;code&gt;ins&lt;/code&gt; Element&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This element is used to contain inline or block-level content that 
 have been added to a pre-existing document. It indicates that the content was added sometime after the creation of the 
 original document. When used with inline text or inline child elements, browsers underline the inserted text.
  With block-level elements, Firefox renders them as usual whereas IE7, Safari and Opera underline them.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;The &lt;code&gt;del&lt;/code&gt; Element&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This element is used to contain inline or block-level content that should be
  deleted or content that should be considered deleted.
  When used with inline elements, all major browsers render the enclosed text with a line through.
 When used with child block elements, Firefox renders the text as usual whereas IE7, Safari 
 and Opera render it with a line through.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;dl&gt;

&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to these elements.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;cite&lt;/code&gt;&lt;/dt&gt;

&lt;dd&gt;&lt;p&gt;This attribute's value is a URL of a document that explains the reason for insertion or deletion.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/dt&gt;

&lt;dd&gt;&lt;p&gt;This attribute's value contains the date, time and timezone 
of the insertion or deletion. The format of the value 
is YYYY-MM-DD&lt;strong&gt;T&lt;/strong&gt;hh:mm:ssTZD&lt;/p&gt;
&lt;p&gt;Example:&lt;code&gt; &amp;lt;del datetime="2008-08-06T16:32+5:30"&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The format for the date is &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. This is followed by the capital letter "T".
 After this is the time in 24-hour format - &lt;code&gt;hh:mm:ss&lt;/code&gt;. This is followed by the time zone. 
 If the time zone is GMT then the code is "Z". Example: "2008-08-06T16:32Z".
  For all other time zones, there is a positive or negative time in the format &lt;code&gt;hh:mm&lt;/code&gt; to indicate 
  how many hours and minutes it is ahead or behind GMT. Example: "2008-08-06T16:32+5:30"&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-34097596116088649?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/34097596116088649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=34097596116088649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/34097596116088649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/34097596116088649'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/and.html' title='The &amp;lt;ins&amp;gt; and &amp;lt;del&amp;gt; Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3184968604608303689</id><published>2010-08-03T17:23:00.000+05:30</published><updated>2010-08-03T17:23:30.197+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Definition Lists: the &lt;dl&gt;, &lt;dt&gt;, and &lt;dd&gt; Elements</title><content type='html'>&lt;p&gt;A Definition List contains one or more terms and their definitions. However, they can be used for any
data that consists of a word or phrase and a longer description of it. For example, the names of people in a 
conversation can be the definition term and the words they speak can be the description. Or the ingredients of a recipe can be the terms
and the details of preparation the descriptions.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.w3.org/TR/html401/struct/lists.html"&gt;http://www.w3.org/TR/html401/struct/lists.html&lt;/a&gt; has a good description of Definition Lists&lt;/p&gt;

&lt;h4&gt;General Form of a Definition List&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;&lt;p&gt;&lt;code&gt;&amp;lt;dl&amp;gt;&lt;br&gt;
&amp;lt;dt&amp;gt;Definition Term&amp;lt;/dt&amp;gt;&lt;br&gt;

&amp;lt;dd&amp;gt;Definition Description&amp;lt;/dd&amp;gt;&lt;br&gt;
&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;lt;/dl&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A definition list consists of the following elements:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;The &lt;code&gt;dl&lt;/code&gt; Element&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This is the parent element of the definition term and definition description elements. Therefore this element can only
 contain &lt;code&gt;dt&lt;/code&gt; and &lt;code&gt;dd&lt;/code&gt; elements.&lt;/p&gt;&lt;/dd&gt;
 
&lt;dt&gt;The &lt;code&gt;dt&lt;/code&gt; Element&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This element contains the term of the definition. It can only contain inline elements&lt;/p&gt;&lt;/dd&gt;
 
&lt;dt&gt;The &lt;code&gt;dd&lt;/code&gt; Element&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This element contains the definition description. It can have block or inline child elements.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to the &lt;code&gt;dl&lt;/code&gt;, &lt;code&gt;dt&lt;/code&gt;, and &lt;code&gt;dd&lt;/code&gt; elements.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;p&gt;Most web browsers render the definition description indented from the left margin (when the language is English).&lt;/p&gt;
&lt;p&gt;There can be more than one &lt;code&gt;dt&lt;/code&gt; element (more than one term) with one &lt;code&gt;dd&lt;/code&gt; element and vice versa.&lt;/p&gt;

&lt;p&gt;Example: &lt;code&gt;&lt;br&gt;
&amp;lt;dl&amp;gt;&lt;br&gt;
&amp;lt;dt&amp;gt;HTML&amp;lt;/dt&amp;gt;&lt;br&gt;
&amp;lt;dt&amp;gt;XHTML&amp;lt;/dt&amp;gt;&lt;br&gt;
&amp;lt;dd&amp;gt;&amp;lt;p&amp;gt;A language that provides a semantic description (meaning) for the content of a document.&amp;lt;/p&amp;gt;&amp;lt;/dd&amp;gt;&lt;br&gt;
&amp;lt;/dl&amp;gt;
&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3184968604608303689?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3184968604608303689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3184968604608303689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3184968604608303689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3184968604608303689'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/definition-lists.html' title='Definition Lists: the &amp;lt;dl&amp;gt;, &amp;lt;dt&amp;gt;, and &amp;lt;dd&amp;gt; Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-2655065554880110930</id><published>2010-08-02T23:56:00.001+05:30</published><updated>2010-08-03T16:30:33.060+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='table elements'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;col&gt; and &lt;colgroup&gt; Elements</title><content type='html'>&lt;p&gt;The &lt;code&gt;col&lt;/code&gt; element is used to define columns in a table. It is an empty element and can only be
used within the &lt;code&gt;table&lt;/code&gt; element where is should appear before any &lt;code&gt;tr&lt;/code&gt; elements.
In (X)HTML, tables are constructed with rows, therefore the &lt;code&gt;col&lt;/code&gt; element is useful because it allows one 
to define and then style columns instead of rows or individual cells.&lt;/p&gt;
&lt;p&gt;According to the &lt;a href="http://www.w3.org/TR/REC-html40/struct/tables.html#edef-COL"&gt;w3.org specification&lt;/a&gt;,
 the &lt;code&gt;col&lt;/code&gt; element does not group columns structurally (semantically). Structural grouping is specified
 by the &lt;code&gt;colgroup&lt;/code&gt; element. A table can have more than one &lt;code&gt;colgroup&lt;/code&gt; elements.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;colgroup&lt;/code&gt; element specifies structural (semantic) columns in a table. This element may contain 
&lt;code&gt;col&lt;/code&gt; child elements. The &lt;code&gt;colgroup&lt;/code&gt; element is always found in the &lt;code&gt;table&lt;/code&gt; element,
and should appear before any &lt;code&gt;tr&lt;/code&gt; elements.&lt;/p&gt;
&lt;p&gt;Using this element, it is possible to apply attributes and styles to groups of columns.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;

&lt;p&gt;Both &lt;code&gt;col&lt;/code&gt; and &lt;code&gt;colgroup&lt;/code&gt; elements can have the following attributes.&lt;/p&gt;

&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute specifies the horizontal text alignment in the column. It
 can take the values &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;, &lt;code&gt;justify&lt;/code&gt;, or 
&lt;code&gt;char&lt;/code&gt;. When &lt;code&gt;align=&amp;quot;char&amp;quot;&lt;/code&gt;, the text is, by default, aligned around the decimal point character
 for the current language, or the character specified in the &lt;code&gt;&amp;quot;char&amp;quot;&lt;/code&gt; attribute.&lt;/p&gt;
 &lt;p&gt;Note: Though this attribute is not deprecated, to set text alignment, the CSS property &lt;code&gt;text-align&lt;/code&gt; is preferred.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;char&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The value of this attribute is a single character around which the text is aligned when &lt;code&gt;align=&amp;quot;char&amp;quot;&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;charoff&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;When present, this attribute specifies the offset to the first occurrence of the alignment character on each line.
Source: &lt;a href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff"&gt;w3.org&lt;/a&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;span&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The value of this attribute is a number. This specifies how many columns are spanned by the current &lt;code&gt;col&lt;/code&gt;
element.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;valign&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Specifies the vertical alignment of the text in the cells of the column. It can take
the values of &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;middle&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, and &lt;code&gt;baseline&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Though this attribute has not been deprecated, the CSS property &lt;code&gt;vertical-align&lt;/code&gt; is preferred.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;width&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute can take pixel values, percentage values, or values in the form &lt;code&gt;n*&lt;/code&gt;, where &lt;var&gt;n&lt;/var&gt; is a number. This 
attribute specifies the width of the column. When the value is in the form of &lt;code&gt;n*&lt;/code&gt;, for example &lt;code&gt;3*&lt;/code&gt;, 
the current column is n-times wider than the other columns. &lt;code&gt;0*&lt;/code&gt; sets the column width to the minimum necessary to
accommodate the contents.&lt;/p&gt;&lt;p&gt;Though this attribute has not been deprecated, using the CSS &lt;code&gt;width&lt;/code&gt; property.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Example 1: &lt;code&gt;&lt;br&gt;&amp;lt;table&amp;gt;&lt;br&gt;
&amp;lt;caption&amp;gt;the table caption&amp;lt;/caption&amp;gt;&lt;br&gt;
&amp;lt;col style=&amp;quot;background-color:red&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;col /&amp;gt;&lt;br&gt;
&amp;lt;col style=&amp;quot;background-color:navajowhite&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;col span=&amp;quot;2&amp;quot; style=&amp;quot;background-color:darkslategray&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;heading&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;heading2&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;heading3&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;/table&amp;gt;&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;Example 2:&lt;br&gt;
&lt;code&gt;&amp;lt;table&amp;gt;&lt;br&gt;
&amp;lt;caption&amp;gt;the table caption 2&amp;lt;/caption&amp;gt;&lt;br&gt;
&amp;lt;colgroup&amp;gt;&lt;br&gt;
&amp;lt;col span=&amp;quot;2&amp;quot; style=&amp;quot;background-color:red&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;/colgroup&amp;gt;&lt;br&gt;
&amp;lt;colgroup span=&amp;quot;3&amp;quot; style=&amp;quot;background-color:cornsilk&amp;quot;&amp;gt;&amp;lt;/colgroup&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;heading&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;heading2&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;heading3&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;col1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;col5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;/table&amp;gt;&lt;/code&gt;
&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/TFf2fxn-xWI/AAAAAAAAAeA/KjxaAT0RPmk/s1600/col_and_colgroup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" alt="col and colgroup example" src="http://3.bp.blogspot.com/__ZdUHId0XUA/TFf2fxn-xWI/AAAAAAAAAeA/KjxaAT0RPmk/s320/col_and_colgroup.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-2655065554880110930?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/2655065554880110930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=2655065554880110930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/2655065554880110930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/2655065554880110930'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/08/element.html' title='The &amp;lt;col&amp;gt; and &amp;lt;colgroup&amp;gt; Elements'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__ZdUHId0XUA/TFf2fxn-xWI/AAAAAAAAAeA/KjxaAT0RPmk/s72-c/col_and_colgroup.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8193483274545490508</id><published>2010-07-26T21:28:00.000+05:30</published><updated>2010-07-26T21:28:27.760+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;code&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;code&lt;/code&gt; element is meant to contain text that represents computer code such as programming code or html code.
It is an inline element.
Browsers render this element in a monospace font such as Courier.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8193483274545490508?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8193483274545490508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8193483274545490508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8193483274545490508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8193483274545490508'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_5722.html' title='The &amp;lt;code&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-49636521592343769</id><published>2010-07-26T20:58:00.001+05:30</published><updated>2010-07-26T21:26:01.443+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;cite&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;cite&lt;/code&gt; element is used to indicate citations. It is an inline element. Citations can be from websites, magazines, books etc. The citation text is rendered in italics in most browsers.&lt;/p&gt;
&lt;p&gt;When citing a web page, you can nest the &lt;code&gt;cite&lt;/code&gt; element in an &lt;code&gt;a&lt;/code&gt; element.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p&amp;gt;The best beginner's book on HTML and CSS that I have read is &amp;lt;cite&amp;gt;Head First HTML&amp;lt;/cite&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__ZdUHId0XUA/SJ3PnkkDNrI/AAAAAAAAAGM/B2XbA6RV6as/s1600-h/cite.GIF"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SJ3PnkkDNrI/AAAAAAAAAGM/B2XbA6RV6as/s320/cite.GIF" id="BLOGGER_PHOTO_ID_5232566620811114162" alt="cite screenshot" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-49636521592343769?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/49636521592343769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=49636521592343769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/49636521592343769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/49636521592343769'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_09.html' title='The &amp;lt;cite&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__ZdUHId0XUA/SJ3PnkkDNrI/AAAAAAAAAGM/B2XbA6RV6as/s72-c/cite.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8432604101725370670</id><published>2010-07-26T20:50:00.000+05:30</published><updated>2010-07-26T20:50:50.850+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The &lt;center&gt; Element</title><content type='html'>The &lt;code&gt;center&lt;/code&gt; element horizontally centers its contents. It is a block element. This element is deprecated. Use CSS instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8432604101725370670?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8432604101725370670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8432604101725370670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8432604101725370670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8432604101725370670'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_26.html' title='The &amp;lt;center&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-6215164579982907734</id><published>2010-07-26T20:36:00.000+05:30</published><updated>2010-07-26T20:36:44.345+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='table elements'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;caption&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;caption&lt;/code&gt; element is used to caption tables. A &lt;dfn&gt;caption&lt;/dfn&gt; is a
 short description of the contents of the table. The &lt;code&gt;caption&lt;/code&gt; element must 
 appear immediately after the &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; tag, there should be no other 
 elements or text in between.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;table&amp;gt;&amp;lt;caption&amp;gt;the table caption&amp;lt;/caption&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;heading&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;row 1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The core attributes can be applied to this element.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;align&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This deprecated attribute specifies the position of the caption.
 Takes the values &lt;code&gt;top&lt;/code&gt;,&lt;code&gt;bottom&lt;/code&gt;,&lt;code&gt;left&lt;/code&gt;,and &lt;code&gt;right&lt;/code&gt;. 
The CSS property &lt;code&gt;caption-side&lt;/code&gt; is preferred instead of this attribute.
&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-6215164579982907734?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/6215164579982907734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=6215164579982907734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6215164579982907734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6215164579982907734'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/caption-tag.html' title='The &amp;lt;caption&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-193414201779536693</id><published>2010-07-26T18:34:00.001+05:30</published><updated>2010-07-27T00:00:00.541+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='form control element'/><title type='text'>The &lt;button&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;button&lt;/code&gt; element is used to submit or clear forms, or to perform an 
action using Javascript. Unlike &lt;code&gt;input&lt;/code&gt; element, which is also used to create 
buttons, &lt;code&gt;button&lt;/code&gt; is not an empty element and therefore all its content serves as the button. 
The &lt;code&gt;button&lt;/code&gt; element can contain almost any element, inline or block. The exceptions are 
the &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;form&lt;/code&gt;, &lt;code&gt;fieldset&lt;/code&gt;, &lt;code&gt;input&lt;/code&gt;,
 &lt;code&gt;select&lt;/code&gt;, &lt;code&gt;textarea&lt;/code&gt;, &lt;code&gt;label&lt;/code&gt; and &lt;code&gt;button&lt;/code&gt;.
 
&lt;p&gt;The &lt;code&gt;button&lt;/code&gt; element, like inline elements, needs to have a block parent element such
as &lt;code&gt;p&lt;/code&gt; or &lt;code&gt;div&lt;/code&gt;. Unlike inline elements, however, it can contain child block elements.&lt;/p&gt;

&lt;p&gt;Example: &lt;code&gt;&amp;lt;form action=&amp;quot;form.php&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&amp;lt;button&amp;gt;&amp;lt;p&amp;gt;the quick brown&amp;lt;/p&amp;gt;&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
 
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;disabled="disabled"&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;With this attribute, the button is disabled (grayed-out).&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;type&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The value of this attribute can be &lt;code&gt;submit&lt;/code&gt;, which submits the form that the button is contained in, &lt;code&gt;reset&lt;/code&gt;, 
which clears all the form's entries, or &lt;code&gt;button&lt;/code&gt; which is used when the action is defined by Javascript. Without
the type attribute, &lt;code&gt;button&lt;/code&gt; functions like a submit button.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This specifies the control name of the button.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;value&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The value of this attribute is sent together with the control name of the button.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;form action=&amp;quot;test.php&amp;quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;button name=&amp;quot;somename&amp;quot; value=&amp;quot;somevalue&amp;quot;&amp;gt;the quick brown&amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When the button is clicked it will send &lt;code&gt;test.php?somename=somevalue&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;

&lt;/dl&gt;
&lt;!--a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__ZdUHId0XUA/SIBeSXPjhvI/AAAAAAAAAE8/xJPtQpAnabk/s1600-h/button+button.JPG"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SIBeSXPjhvI/AAAAAAAAAE8/xJPtQpAnabk/s320/button+button.JPG" alt="" id="BLOGGER_PHOTO_ID_5224279237319689970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You can mix text and images.--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-193414201779536693?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/193414201779536693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=193414201779536693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/193414201779536693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/193414201779536693'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/tag_18.html' title='The &amp;lt;button&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1028730194082698772</id><published>2010-07-25T21:06:00.001+05:30</published><updated>2010-07-25T21:07:48.631+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>The &lt;br&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;br&lt;/code&gt; tag is used to indicate a semantic break in a paragraph. The browser inserts a line break when it encounters this element. Therefore, it continues rendering the content on the next line. This is an empty tag. This element can appear in any element that can contain text.&lt;p&gt;
&lt;p&gt;A paragraph is used to introduce a new idea in a text. The &lt;code&gt;br&lt;/code&gt; element can be used when a new idea needs to be introduced, but a new paragraph is not warranted.&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;p&gt;Apart from the &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;, there is only the &lt;code&gt;clear&lt;/code&gt; attribute, which is deprecated in favor of CSS.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;clear&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;This attribute can take the values &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt; and &lt;code&gt;all&lt;/code&gt;. This specifies if the content after the &lt;code&gt;br&lt;/code&gt; tag should be rendered in a new line that starts vertically below any floated elements.&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1028730194082698772?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1028730194082698772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1028730194082698772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1028730194082698772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1028730194082698772'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_11.html' title='The &amp;lt;br&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5153827047385760292</id><published>2010-07-25T20:25:00.001+05:30</published><updated>2010-12-30T11:12:39.695+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='structural element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;body&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;body&lt;/code&gt; element contains all the displayed
 content of the document. Its parent element is &lt;code&gt;html&lt;/code&gt;
  and it appears after the &lt;code&gt;head&lt;/code&gt; element. It can contains block-level 
  elements and the &lt;code&gt;script&lt;/code&gt; element.&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;p&gt;Apart from the 
&lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html"&gt;Core Attributes&lt;/a&gt;, 
there are a number of presentational attributes the &lt;code&gt;body&lt;/code&gt; can have. 
However, all the presentational attributes are deprecated in favor of CSS. These deprecated attributes are:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;background&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;The value of this is a URL of an image which will be used as a tiled background to the entire page&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;bgcolor&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;The value of this is a color name or a color specified in hexadecimal notation. This sets the background color of the page.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;text&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;The value of this is a color name or a color specified in hexadecimal notation. This sets the color of the text in the page.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;link&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;The value of this is a color name or a color specified in hexadecimal notation. This sets the color of links in the document.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;alink&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Sets the color of links when they are in the active state.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;vlink&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Sets the color of visited links.&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5153827047385760292?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5153827047385760292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5153827047385760292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5153827047385760292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5153827047385760292'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/tag_8564.html' title='The &amp;lt;body&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-9055896038130249249</id><published>2010-07-25T13:20:00.006+05:30</published><updated>2010-07-25T20:05:58.536+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='block element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;blockquote&gt; Element</title><content type='html'>&lt;p&gt;The &lt;samp&gt;blockquote&lt;/samp&gt; tag is used to indicate a quotation that is lengthy or that consists of one or more paragraphs. It can only contain block-elements (and the &lt;code&gt;script&lt;/code&gt; element) as child elements. It cannot contain text directly.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;blockquote cite=&amp;quot;The Michigan School Moderator&amp;quot;&amp;gt;&amp;lt;p&amp;gt;The quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
 &lt;dt&gt;&lt;code&gt;cite&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;Indicates the source of the quotation&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-9055896038130249249?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/9055896038130249249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=9055896038130249249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/9055896038130249249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/9055896038130249249'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_25.html' title='The &amp;lt;blockquote&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3036196952601742421</id><published>2010-07-24T23:17:00.000+05:30</published><updated>2010-07-24T23:17:38.141+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The &lt;big&gt; Element</title><content type='html'>The &lt;code&gt;big&lt;/code&gt; element makes its text content's font size larger than the inherited font size. However, this a presentational element and even though it hasn't been deprecated, shouldn't be used. CSS should be used instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3036196952601742421?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3036196952601742421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3036196952601742421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3036196952601742421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3036196952601742421'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_7036.html' title='The &amp;lt;big&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-170154573079715261</id><published>2010-07-24T22:27:00.000+05:30</published><updated>2010-07-24T22:27:01.266+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;bdo&gt; Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;bdo&lt;/code&gt; element is used to change the direction of rendering of characters of text. That is, characters that would be rendered one after another from left to right would instead be rendered from right to left and vice versa. It is an inline element.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This is a required attribute. It can take the values &lt;code&gt;ltr&lt;/code&gt; or &lt;code&gt;rtl&lt;/code&gt; which stand for left-to-right and right-to-left&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p&amp;gt;The quick &amp;lt;bdo dir="rtl"&amp;gt;brown&amp;lt;/bdo&amp;gt; fox&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/TEsBCwlH3fI/AAAAAAAAAd4/TLzmXcRRqzI/s1600/the+quick_1279981169707+del+immediately.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/TEsBCwlH3fI/AAAAAAAAAd4/TLzmXcRRqzI/s320/the+quick_1279981169707+del+immediately.png" alt="bdo screenshot" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;lang&lt;/code&gt; and &lt;code&gt;xml:lang&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;This specifies the language of the text content of the &lt;code&gt;bdo&lt;/code&gt; tag. See &lt;a href="http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html#lang"&gt;Core Attributes&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-170154573079715261?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/170154573079715261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=170154573079715261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/170154573079715261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/170154573079715261'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_24.html' title='The &amp;lt;bdo&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__ZdUHId0XUA/TEsBCwlH3fI/AAAAAAAAAd4/TLzmXcRRqzI/s72-c/the+quick_1279981169707+del+immediately.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1381854671675530669</id><published>2010-07-22T23:19:00.000+05:30</published><updated>2010-07-22T23:19:09.778+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The &lt;basefont&gt; Element</title><content type='html'>This element is used to specify certain font attributes such as color, size etc. However, this element is deprecated. Use CSS to style text instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1381854671675530669?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1381854671675530669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1381854671675530669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1381854671675530669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1381854671675530669'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_7008.html' title='The &amp;lt;basefont&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-6741785110486494122</id><published>2010-07-22T23:13:00.002+05:30</published><updated>2010-07-22T23:16:20.278+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='head element'/><title type='text'>The &lt;base&gt; element</title><content type='html'>&lt;p&gt;&lt;code&gt;base&lt;/code&gt; is an empty element, which means that it does not have any content. However it does have attributes. It is only found in the &lt;code&gt;head&lt;/code&gt; element. This element must appear before any element that contains URLs.&lt;/p&gt;

&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;href&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This is a required attribute whose value is a URL which is added on to all relative URLs in the document. The url specified must end with a forward slash. Note that the base url specified affects &lt;strong&gt;all&lt;/strong&gt; relative URLs - those contained in &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;base href=&amp;quot;http://destination-code.blogspot.com/&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Example: 2 &lt;code&gt;&amp;lt;base href=&amp;quot;/pages/&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;target&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;All links in the page (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; elements) load in a new window with the internal name specified in &lt;code&gt;target&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;base href= &amp;quot;/images/&amp;quot; target=&amp;quot;_blank&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note that the default target can be overridden by the &lt;code&gt;target&lt;/code&gt; attribute in an &lt;code&gt;a&lt;/code&gt; tag.&lt;/p&gt;&lt;/dd&gt;

&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-6741785110486494122?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/6741785110486494122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=6741785110486494122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6741785110486494122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6741785110486494122'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/08/base-tag.html' title='The &amp;lt;base&amp;gt; element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8162434701294444266</id><published>2010-07-22T20:00:00.001+05:30</published><updated>2010-07-22T21:57:32.936+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='presentational'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;b&gt; Element</title><content type='html'>&lt;p&gt;This text content of the &lt;code&gt;b&lt;/code&gt; element is rendered in boldface. It is an inline element. Though this element's purpose is purely presentational, it hasn't been deprecated, probably because of its earlier widespread use. It is preferable to use the &lt;code&gt;strong&lt;/code&gt; element instead of &lt;code&gt;b&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example: &lt;code&gt;It is better &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; to use the b element.&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8162434701294444266?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8162434701294444266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8162434701294444266' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8162434701294444266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8162434701294444266'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_22.html' title='The &amp;lt;b&amp;gt; Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8126494121722110581</id><published>2010-07-21T20:31:00.003+05:30</published><updated>2010-07-22T19:29:46.743+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The &lt;area&gt; element</title><content type='html'>&lt;p&gt;The &lt;code&gt;area&lt;/code&gt; element is always a child element of the &lt;code&gt;map&lt;/code&gt; element.
It is an empty element. Its function is similar to &lt;code&gt;a&lt;/code&gt; 
element in that it is used to create hyperlinks. However, &lt;code&gt;area&lt;/code&gt; defines
hyperlinks in imagemaps only. It does so by means of the &lt;code&gt;href&lt;/code&gt;, 
&lt;code&gt;coords&lt;/code&gt; and &lt;code&gt;shape&lt;/code&gt; attributes.
&lt;/p&gt;

&lt;h4&gt;Attributes of &lt;code&gt;&amp;lt;area&amp;gt;&lt;/code&gt;&lt;/h4&gt;

&lt;dl&gt;

&lt;dt&gt;&lt;code&gt;alt&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This is a required attribute. Its function here is similar as in the
&lt;code&gt;img&lt;/code&gt; element. Here it provides a short description of the defined area.&lt;/p&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;code&gt;coords&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;This attribute specifies a series of comma separated values whose meaning
depends on the value of the &lt;code&gt;shape&lt;/code&gt; attribute. All coordinates are with respect to the top left corner of the image box.&lt;/p&gt;
 &lt;dl&gt;
 &lt;dt&gt;&lt;code&gt;shape="rect"&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;&lt;p&gt;This indicates that the defined area is a rectangle.
  In this case, the &lt;code&gt;coords&lt;/code&gt; attribute will have four values.
  The first two values are the &lt;var&gt;x&lt;/var&gt; and &lt;var&gt;y&lt;/var&gt; coordinates, in pixels,
  of the top left corner of the rectangle, and the following two values are the coordinates
  of the bottom right corner.&lt;/p&gt;
  &lt;p&gt;Example: &lt;code&gt;&amp;lt;area alt=&amp;quot;garden&amp;quot; shape=&amp;quot;rect&amp;quot; coords=&amp;quot;10,50,80,20&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;shape="circle"&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;&lt;p&gt;This indicates that the defined area is a circle.
  In this case, the &lt;code&gt;coords&lt;/code&gt; attribute will have three values.
  The first two values are the &lt;var&gt;x&lt;/var&gt; and &lt;var&gt;y&lt;/var&gt; coordinates, in pixels,
  of the center of the circle. The next value is the radius, also in pixels.&lt;/p&gt;
  &lt;p&gt;Example: &lt;code&gt;&amp;lt;area alt=&amp;quot;pool&amp;quot; shape=&amp;quot;circle&amp;quot; coords=&amp;quot;20,40,10&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
 &lt;dt&gt;&lt;code&gt;shape="poly"&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This indicates that the defined area is a polygon. Triangles, rectangles, pentagons, etc. are
  polygons. In this case, there is no limit on the number of values. Each pair of values is the coordinate of
  one of the vertices of the polygon. The last pair of values should be the same as the first.&lt;/p&gt;
  &lt;p&gt;Example: &lt;code&gt;&amp;lt;area alt=&amp;quot;house&amp;quot; shape=&amp;quot;poly&amp;quot; coords=&amp;quot;35,75,42,82,73,93,20,30&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
 &lt;/dl&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;href&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;Specifies the URL or the file that is linked to the clickable area&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;nohref="nohref"&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This attribute is used to indicate that the area is not hyperlinked.&lt;/p&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;target&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;Specifies the name of the window or frame that the linked document should open in.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8126494121722110581?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8126494121722110581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8126494121722110581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8126494121722110581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8126494121722110581'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element_21.html' title='The &amp;lt;area&amp;gt; element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7817265572582581625</id><published>2010-07-21T17:27:00.000+05:30</published><updated>2010-07-21T17:27:56.676+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='deprecated'/><title type='text'>The &lt;applet&gt; element</title><content type='html'>&lt;p&gt;The &lt;code&gt;applet&lt;/code&gt; element is used to place a Java applet in a web page. This element is deprecated and has been replaced by the &lt;code&gt;object&lt;/code&gt; element.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7817265572582581625?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7817265572582581625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7817265572582581625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7817265572582581625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7817265572582581625'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/element.html' title='The &amp;lt;applet&amp;gt; element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5485585223731239985</id><published>2010-07-20T22:37:00.001+05:30</published><updated>2010-07-24T20:27:07.465+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='attribute'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>(X)HTML Core Attributes - dir, class, id, lang, xml:lang, style and title</title><content type='html'>&lt;p&gt;There are a few attributes that are considered "core attributes" 
because they can be applied to nearly every element. They are:&lt;/p&gt;
&lt;dl&gt;
&lt;dt id="dir"&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;It can take the values &lt;code&gt;rtl&lt;/code&gt; or &lt;code&gt;ltr&lt;/code&gt; which
 stand for right-to-left and left-to-right. This attribute specifies &lt;q&gt;base direction 
 of directionally neutral text (i.e., text that doesn't have inherent directionality as 
 defined in &lt;a href="http://www.w3.org/TR/REC-html40/references.html#ref-UNICODE"&gt;Unicode&lt;/a&gt;). 
 It also specifies the 
 &lt;a href="http://www.w3.org/TR/REC-html40/struct/tables.html#table-directionality"&gt;directionality of tables&lt;/a&gt;.&lt;/q&gt;
 Source: &lt;a href="http://www.w3.org/TR/REC-html40/struct/dirlang.html#adef-dir"&gt;W3C&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p dir=&amp;quot;rtl&amp;quot;&amp;gt;The quick brown fox&amp;lt;/p&amp;gt;&lt;/code&gt; In this example, the text is aligned to the right
 in the same way that &lt;code&gt;text-align:right&lt;/code&gt; would. This attribute is inherited by child elements.&lt;/p&gt;
 &lt;p&gt;This attribute can be applied to all elements except &lt;code&gt;applet&lt;/code&gt;, &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;basefont&lt;/code&gt;, 
 &lt;code&gt;bdo&lt;/code&gt;, &lt;code&gt;br&lt;/code&gt;, &lt;code&gt;frame&lt;/code&gt;, &lt;code&gt;frameset&lt;/code&gt;, &lt;code&gt;iframe&lt;/code&gt;, &lt;code&gt;param&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;.&lt;/p&gt;
 &lt;/dd&gt;
&lt;dt id="class"&gt;&lt;code&gt;class&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;A &lt;dfn&gt;class&lt;/dfn&gt; is a name under which multiple (X)HTML elements can be grouped for the purpose of 
 styling using CSS or scripting using Javascript. A single element can be associated 
 with multiple classes, each class name being separated by spaces.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p class=&amp;quot;products floated&amp;quot;&amp;gt;the quick brown fox jumps&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
 &lt;p&gt;In the above example, the &lt;code&gt;p&lt;/code&gt; belongs to two classes: &lt;code&gt;products&lt;/code&gt; and &lt;code&gt;floated&lt;/code&gt;.&lt;/p&gt;
 &lt;p&gt;The class attribute can be applied to all elements except &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;basefont&lt;/code&gt;, 
 &lt;code&gt;head&lt;/code&gt;, &lt;code&gt;html&lt;/code&gt;, &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;param&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;, &lt;code&gt;style&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;.&lt;/p&gt;&lt;/dd&gt;
&lt;dt id="id"&gt;&lt;code&gt;id&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;An &lt;code&gt;id&lt;/code&gt; is a name assigned to a single element in an (X)HTML document for the purpose of styling
 using CSS and scripting using Javascript and it is also used for creating fragments. 
 An element can have only one &lt;code&gt;id&lt;/code&gt;. No two elements should have the same &lt;code&gt;id&lt;/code&gt; value.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p id=&amp;quot;tagline&amp;quot;&amp;gt;the quick brown fox&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
 &lt;p&gt;The &lt;code&gt;id&lt;/code&gt; attribute can be applied to all elements except &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;head&lt;/code&gt;, &lt;code&gt;html&lt;/code&gt;, &lt;code&gt;meta&lt;/code&gt;, 
 &lt;code&gt;script&lt;/code&gt;, &lt;code&gt;style&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;.&lt;/p&gt;&lt;/dd&gt;
&lt;dt id="lang"&gt;&lt;code&gt;lang&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;The &lt;code&gt;lang&lt;/code&gt; attribute identifies the language (human languages, not computer languages) of the text content and 
 attribute values of an element. The language is specified using a two-letter code specified in &lt;a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes"&gt;ISO 639-1&lt;/a&gt;.
  The &lt;code&gt;lang&lt;/code&gt; attribute helps screen readers to pronounce words correctly, 
 helps browsers to choose the correct fonts and the punctuation such as correct quotation marks, and helps search engines 
 to identify the language of a web page.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p&amp;gt;The French word for apple is &amp;lt;span lang=&amp;quot;fr&amp;quot;&amp;gt;pomme&amp;lt;/span&amp;gt;.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
 &lt;p&gt;This attribute can be applied to any element except &lt;code&gt;applet&lt;/code&gt;, &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;basefont&lt;/code&gt;, &lt;code&gt;br&lt;/code&gt;, 
 &lt;code&gt;frame&lt;/code&gt;, &lt;code&gt;frameset&lt;/code&gt;, &lt;code&gt;iframe&lt;/code&gt;, &lt;code&gt;param&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;.&lt;/p&gt;
 &lt;p&gt;This attribute is inherited by child elements. The &lt;code&gt;lang&lt;/code&gt; attribute is often applied
 to the &lt;code&gt;html&lt;/code&gt; element to specify the language of the document.&lt;/p&gt;&lt;/dd&gt;
&lt;dt id="xml:lang"&gt;&lt;code&gt;xml:lang&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;This attribute is similar to the &lt;code&gt;lang&lt;/code&gt; attribute, but is used only in XHTML documents.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p xml:lang=&amp;quot;fr&amp;quot;&amp;gt;Bonjour! Comment allez-vous?&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt id="style"&gt;&lt;code&gt;style&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;The &lt;code&gt;style&lt;/code&gt; attribute is used to apply CSS a rule to an element. The value of the 
 &lt;code&gt;style&lt;/code&gt; attribute is one or more CSS declarations separated by semicolons and, optionally, spaces. Curly
 brace limiters ({ and }) are not allowed. It cannot contain CSS selectors.&lt;/p&gt;
 &lt;p&gt;The CSS declarations in the style attribute have the highest specificity
  and are known as &lt;dfn&gt;inline styles&lt;/dfn&gt;.&lt;/p&gt;
  &lt;p&gt;Example: &lt;code&gt;&amp;lt;p style=&amp;quot;background-color:navajowhite;color:indianred&amp;quot;&amp;gt;the quick brown fox&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
  &lt;p&gt;The &lt;code&gt;style&lt;/code&gt; attribute can be applied to all elements except &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;basefont&lt;/code&gt;, 
  &lt;code&gt;head&lt;/code&gt;, &lt;code&gt;html&lt;/code&gt;, &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;param&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;, 
  &lt;code&gt;style&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;.&lt;/p&gt;&lt;/dd&gt;
&lt;dt id="title"&gt;&lt;code&gt;title&lt;/code&gt;&lt;/dt&gt;
 &lt;dd&gt;&lt;p&gt;The &lt;code&gt;title&lt;/code&gt; attribute contains additional information about an element. If the element
 is displayed, browsers display the value of the &lt;code&gt;title&lt;/code&gt; attribute as a tool tip when the mouse hovers over it.&lt;/p&gt;
 &lt;p&gt;Example: &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;img src=&amp;quot;photo1.jpg&amp;quot; alt=&amp;quot;Photo of the Himalayas&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
 &lt;p&gt;The &lt;code&gt;title&lt;/code&gt; attribute can be applied to all elements except 
 &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;basefont&lt;/code&gt;, &lt;code&gt;head&lt;/code&gt;, &lt;code&gt;html&lt;/code&gt;, 
 &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;param&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;.&lt;/p&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5485585223731239985?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5485585223731239985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5485585223731239985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5485585223731239985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5485585223731239985'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/xhtml-core-attributes-dir-class-id-lang.html' title='(X)HTML Core Attributes - dir, class, id, lang, xml:lang, style and title'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5401028939843262533</id><published>2010-07-19T22:50:00.004+05:30</published><updated>2010-12-19T20:20:40.850+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='inline element'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The a Element</title><content type='html'>&lt;p&gt;The &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element defines an &lt;dfn&gt;anchor&lt;/dfn&gt;. It is
 used for two purposes: to create a hyperlink and to create a fragment. A hyperlink is a clickable 
 area that when clicked, will take the user to another document or to a particular element in the same document.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element is an inline element, therefore it must have a block element as an ancestor.
 It can contain text or child inline elements. Therefore, text, images, inline elements, and line breaks can be made hyperlinks.
 The &lt;code&gt;href&lt;/code&gt; attribute of the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element 
 contains the destination of the hyperlink. The destination can be another webpage or file,
  or it can be a fragment in the same or a different page.&lt;/p&gt;
  
&lt;p&gt;Below is an example of a hyperlink to an HTML document.&lt;/p&gt;

&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;a href=&amp;quot;about.html&amp;quot;&amp;gt;About Us&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Below is an example of an image hyperlink.&lt;/p&gt;

&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;a href=&amp;quot;large.jpg&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;small.jpg&amp;quot; alt=&amp;quot;an image&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;
 
  
&lt;p&gt;A &lt;dfn&gt;fragment&lt;/dfn&gt; is an element in a document that has been labelled using the &lt;code&gt;name&lt;/code&gt;
  or the &lt;code&gt;id&lt;/code&gt; attribute.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://www.w3.org/TR/html401/struct/links.html"&gt;W3C HTML 4.01 specification for links&lt;/a&gt; states "Destination anchors
 in HTML documents may be specified either by the &lt;code&gt;a&lt;/code&gt; element (naming it with the name attribute), or by any other element 
(naming with the id attribute)". The &lt;a href="http://www.w3.org/TR/xhtml1/#h-4.10"&gt; &lt;code&gt;name&lt;/code&gt; 
and &lt;code&gt;id&lt;/code&gt; specification for XHTML 1.0 states&lt;/a&gt; "XHTML 1.0 documents MUST use the &lt;code&gt;id&lt;/code&gt; 
attribute when defining fragment identifiers".&lt;/p&gt;
&lt;p&gt;Therefore, the &lt;code&gt;name&lt;/code&gt; attribute should never be used in XHTML 1.0 documents (except in form control elements where they are allowed). In
HTML 4.01 documents, either the &lt;code&gt;name&lt;/code&gt; or the &lt;code&gt;id&lt;/code&gt; attribute
can be used to specify fragments. To conclude, it is best to use only the &lt;code&gt;id&lt;/code&gt;
attribute irrespective of document type (HTML or XHTML).&lt;/p&gt;
  
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p name=&amp;quot;product_1&amp;quot;&amp;gt;The five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p id=&amp;quot;product_1&amp;quot;&amp;gt;The five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The first example shows a fragment in an HTML 4.01 document. The second example shows 
 the same fragment in an XHTML 1.0 or HTML 4.01 document, created using the &lt;code&gt;id&lt;/code&gt; attribute.
  In both cases, the fragment can be referenced from within the same document by a hyperlink as shown in the example below.&lt;/p&gt;
 
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;a href=&amp;quot;#product_1&amp;quot;&amp;gt;Go to Product 1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The fragment shown in Example 3 and Example 4 can be accessed from another document by 
including the filename followed by the hash symbol and fragment name, as shown below.&lt;/p&gt;

&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;a href=&amp;quot;products.html#product_1&amp;quot;&amp;gt;Go to Product 1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;span style="font-style: italic;"&gt;id&lt;/span&gt; value must begin with a letter and can contain numbers, hyphens, underscores, colons and periods. An &lt;span style="font-style: italic;"&gt;id&lt;/span&gt; must be unique in a page.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;a&lt;/code&gt; element can have one &lt;span style="font-style: italic;"&gt;title&lt;/span&gt; attribute that
 specifies a description of the hyperlink. It is displayed as a tooltip when the mouse moves over the link.&lt;/p&gt;

&lt;p&gt;Transitional DTD's allow the &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; tag to have the &lt;span style="font-style: italic;"&gt;target&lt;/span&gt; attribute. With this attribute, you can specify the name of the window in which the link should open.&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;a href=&amp;quot;news.html&amp;quot; title=&amp;quot;news.html&amp;quot; target=&amp;quot;stuff&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will cause news.html to open in a new window. This window will have the internal name &amp;quot;stuff&amp;quot;. If a window with the internal name "stuff" is already open, then news.html will open in it.&lt;/p&gt;
&lt;p&gt;The &lt;span style="font-style: italic;"&gt;target&lt;/span&gt; attribute is also useful in frame documents. Using this attribute links in one frame can open in another.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Special Targets&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There are four special &lt;span style="font-style: italic;"&gt;target&lt;/span&gt; values - &lt;span style="font-style: italic;"&gt;_blank&lt;/span&gt; , &lt;span style="font-style: italic;"&gt;_self&lt;/span&gt; , &lt;span style="font-style: italic;"&gt;_parent&lt;/span&gt;  and &lt;span style="font-style: italic;"&gt;_top&lt;/span&gt; .
&lt;p&gt;&lt;span style="font-style: italic;"&gt;_blank&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This target causes the linked document to always open in a new window. The new window will not have an internal name.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-style: italic;"&gt;_self&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This target causes the linked document to always load in the same window or frame as the link. This is the default behavior of links. This target value is useful to override the target specified in the &lt;span style="font-style: italic;"&gt;base&lt;/span&gt; tag of the document.
&lt;span style="font-style: italic;"&gt;_parent&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This causes the linked document to open in the parent of the document that contains the link. This is useful when using iframes. The document in the iframe can have links that when clicked, cause the linked document to open in the entire window rather than in the frame.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-style: italic;"&gt;_top&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This causes the linked document to open in the topmost frame in the hierarchy. In a framed document, it is useful to include this attribute in all links that lead to other websites. This prevents outside websites from loading within the same frameset.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5401028939843262533?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5401028939843262533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5401028939843262533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5401028939843262533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5401028939843262533'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2008/07/tag_02.html' title='The a Element'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-935195691288617092</id><published>2010-07-19T00:09:00.001+05:30</published><updated>2010-07-19T19:53:13.446+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>(X)HTML Minimum Document Structure</title><content type='html'>&lt;p&gt;Every (X)HTML document must have a Document Type Declaration, &lt;code&gt;html&lt;/code&gt; as the root element, &lt;code&gt;head&lt;/code&gt; and &lt;code&gt;body&lt;/code&gt; as the child elements, and &lt;code&gt;title&lt;/code&gt; as the child element of &lt;code&gt;head&lt;/code&gt;. In XHTML documents, the &lt;code&gt;html&lt;/code&gt; element must have the attribute &lt;code&gt;xmlns&lt;/code&gt; and &lt;code&gt;xml:lang&lt;/code&gt; and &lt;code&gt;lang&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;!DOCTYPE HTML &amp;quot;-//W3C//DTD HTML 4.01//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/strict.dtd&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;html&amp;gt;
&lt;br&gt;&amp;lt;head&amp;gt;
&lt;br&gt;&amp;lt;title&amp;gt;&lt;i&gt;some title&lt;/i&gt;&amp;lt;/title&amp;gt;
&lt;br&gt;&amp;lt;/head&amp;gt;
&lt;br&gt;&amp;lt;body&amp;gt;
&lt;br&gt;&lt;i&gt;body content&lt;/i&gt;
&lt;br&gt;&amp;lt;/body&amp;gt;
&lt;br&gt;&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xml:lang=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;head&amp;gt;
&lt;br&gt;&amp;lt;title&amp;gt;&lt;i&gt;some title&lt;/i&gt;&amp;lt;/title&amp;gt;
&lt;br&gt;&amp;lt;/head&amp;gt;
&lt;br&gt;&amp;lt;body&amp;gt;
&lt;br&gt;&lt;i&gt;body content&lt;/i&gt;
&lt;br&gt;&amp;lt;/body&amp;gt;
&lt;br&gt;&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;lang&lt;/code&gt; attribute's value specifies the language of the content of the &lt;code&gt;body&lt;/code&gt;
 tag. This attribute can also be used on other elements. The &lt;code&gt;xml:lang&lt;/code&gt; attribute has the same function
 as &lt;code&gt;lang&lt;/code&gt;, but it is used only in XHTML documents. The value of these attributes is a two-letter code specified
 in &lt;a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes"&gt;ISO 639-1&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;A webpage can also include a &lt;code&gt;meta&lt;/code&gt; tag that specifies the character encoding of the page.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;meta http-equiv=&amp;quot;content-type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;http-equiv&lt;/code&gt; attribute is used by HTTP servers to gather information for HTTP response headers.
 Therefore, in the above example, the HTTP response header will have &lt;code&gt;content-type: text/html; charset=utf-8&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The example below includes a &lt;code&gt;meta&lt;/code&gt; tag that specifies the HTTP response header.&lt;/p&gt;

&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xml:lang=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;head&amp;gt;
&lt;br&gt;&amp;lt;meta http-equiv=&amp;quot;content-type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;
&lt;br&gt;&amp;lt;title&amp;gt;&amp;lt;i&amp;gt;some title&amp;lt;/i&amp;gt;&amp;lt;/title&amp;gt;
&lt;br&gt;&amp;lt;/head&amp;gt;
&lt;br&gt;&amp;lt;body&amp;gt;
&lt;br&gt;&amp;lt;i&amp;gt;body content&amp;lt;/i&amp;gt;
&lt;br&gt;&amp;lt;/body&amp;gt;
&lt;br&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-935195691288617092?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/935195691288617092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=935195691288617092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/935195691288617092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/935195691288617092'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/xhtml-minimum-document-structure.html' title='(X)HTML Minimum Document Structure'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-996223081813431317</id><published>2010-07-17T18:55:00.002+05:30</published><updated>2010-12-13T23:12:20.490+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhtml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Document Type Declaration</title><content type='html'>&lt;p&gt;A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML (HTML) or XML (XHTML) document with a Document Type Definition (DTD). (Source &lt;a href="http://en.wikipedia.org/wiki/Document_Type_Declaration"&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Example: &lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/strict.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The general syntax of Document Type Declaration of (X)HTML documents is:
&lt;code&gt;&amp;lt;!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] &amp;quot;uri&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In web pages the root element is always &lt;code&gt;html&lt;/code&gt;. The keywords &lt;code&gt;SYSTEM&lt;/code&gt; or &lt;code&gt;PUBLIC&lt;/code&gt; indicate whether the DTD is stored in a private computer or a public one. If public, then the keyword is followed by a Formal Public Identifier (FPI). An FPI is a specially formatted string of text that uniquely identifies the DTD. If the SYSTEM keyword is chosen, an FPI is not necessary. The FPI in the above example is &lt;code&gt;&amp;quot;//W3C//DTD HTML 4.01//EN&amp;quot;&lt;/code&gt;. And the last item found in (X)HTML Document Type Declarations is the URI of the DTD. In the above example, it is &lt;code&gt;&amp;quot;http://www.w3.org/TR/html4/strict.dtd&amp;quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A Document Type Definition (DTD) is a set of markup declarations that define a document type for SGML-family markup languages (SGML, XML, HTML). Source: &lt;a href="http://en.wikipedia.org/wiki/Document_Type_Definition"&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;A DTD defines what elements are in the document, the attributes the elements can have, the contents of the elements etc.&lt;/p&gt;

&lt;p&gt;These are the current Document Type Declarations used in (X)HTML pages:

&lt;dl&gt;

&lt;dt&gt;HTML 4.01 Declarations&lt;/dt&gt;
&lt;dd&gt;&lt;dl&gt;
&lt;dt&gt;HTML 4.01 Strict&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/strict.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;HTML 4.01 Transitional&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;
   &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;HTML 4.01 Frameset&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Frameset//EN&amp;quot;
   &amp;quot;http://www.w3.org/TR/html4/frameset.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/dd&gt;

&lt;dt&gt;XHTML 1.0 Declarations&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;XHTML 1.0 Strict&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;XHTML 1.0 Transitional&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;XHTML 1.0 Frameset&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Frameset//EN&amp;quot;
   &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;dt&gt;HTML 5&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;/dd&gt;
&lt;/dl&gt;

&lt;p&gt;The root element (HTML) in the declaration can be lower case or upper case for HTML 4.01.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-996223081813431317?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/996223081813431317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=996223081813431317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/996223081813431317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/996223081813431317'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/document-type-declaration.html' title='Document Type Declaration'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1324423394559021744</id><published>2010-07-12T21:57:00.000+05:30</published><updated>2010-07-12T21:57:02.385+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Definition of HTML, XHTML and CSS</title><content type='html'>&lt;p&gt;HTML stands for HyperText Markup Language. It is a language that provides a semantic description (meaning) for the content of a document. It also specifies a structure for the document in the form of a hierarchy of elements.&lt;/p&gt;
&lt;p&gt;Hypertext is text displayed on a computer or other electronic device with references (hyperlinks) to other text that the reader can immediately access, usually by a mouse click or keypress sequence. (Source: &lt;a href="http://en.wikipedia.org/wiki/HyperText"&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. (Source: &lt;a href="http://en.wikipedia.org/wiki/Markup_language"&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;XHTML stands for Extensible HyperText Markup Language. It is "a reformulation of the three HTML 4 document types as applications of XML 1.0". (Source: &lt;a href="http://www.w3.org/TR/xhtml1/#xhtml"&gt;W3C&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;XHTML provides the following benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extensiblity: The language allows for future growth&lt;/li&gt;
&lt;li&gt;Interoperablity: XHTML documents can be transformed for constrained devices such as mobile phones&lt;/li&gt;
&lt;li&gt;Namespaces: Fragments from other XML-based languages could be included by specifying the namespace using the &lt;code&gt;xmlns&lt;/code&gt; attribute.&lt;/li&gt;
&lt;li&gt;Modularization: HTML could be divided into reusable components.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CSS stands for Cascading Style Sheets.&lt;/p&gt;
&lt;p&gt;CSS is a style sheet language used to describe the presentation semantics (the look and formatting) of HTML and XHTML pages. A style sheet language is a computer language used to describe the presentation of structured documents. (source: Wikipedia)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1324423394559021744?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1324423394559021744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1324423394559021744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1324423394559021744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1324423394559021744'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/07/definition-of-html-xhtml-and-css.html' title='Definition of HTML, XHTML and CSS'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-6759671675303425888</id><published>2010-03-22T16:30:00.000+05:30</published><updated>2010-03-22T16:30:35.280+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='layout properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The float Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;float&lt;/code&gt; property is used to specify whether an element is 
floated or not and the direction (left or right) that it is floated. The &lt;code&gt;float&lt;/code&gt; property can be applied to any element. 
It is not an inherited property. It can take the values &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, 
&lt;code&gt;none&lt;/code&gt;, and 
&lt;code&gt;inherit&lt;/code&gt;. Its initial value is &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A floated element does not affect the positioning of other block elements. 
However, inline boxes are shortened to make room for the margin box of a floted 
element.&lt;/p&gt;
&lt;p&gt;Margins on floated elements never collapse. How a floated element behaves is described in the
&lt;a href="http://www.w3.org/TR/CSS21/visuren.html#floats"&gt;W3C specification of 
floated elements&lt;/a&gt;. The description consists of nine rules.&lt;/p&gt;
&lt;p&gt;Rule 1 states that the left outer edge (outer edge of the left margin) of a left-floating box may not be to 
the left of the left edge (outer edge of the padding) of its containing block. An analogous rule holds for 
right-floating elements.&lt;/p&gt;
&lt;p&gt;What this means is that the outer edge of the left margin of a left-floated 
element will be aligned with the inner edge of the left padding of the 
containing block. Similarly, the outer edge of the right margin of a 
right-floated element will be aligned with the inner edge of the right padding 
of the containing block.&lt;/p&gt;

&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;padding:10px;border:dashed 10px steelblue&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; five 
boxin&amp;lt;img src=&amp;quot;image4.png&amp;quot; alt=&amp;quot;image 4&amp;quot; 
style=&amp;quot;float:left;margin:5px;padding:10px;border:solid 5px slategray; 
background-color:palegreen&amp;quot;&amp;gt;g wizards jump quickly, the quick brown fox jumps 
over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGRfl0fDI/AAAAAAAAAbw/8J2RSnxja6U/s1600-h/float_testing_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGRfl0fDI/AAAAAAAAAbw/8J2RSnxja6U/s320/float_testing_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the gap between the left border outer edge of the image 
and left border inner edge of the &amp;lt;p&amp;gt; is 15px. This is because the left margin 
of the image is 5px and the left padding of the &amp;lt;p&amp;gt; is 10px and, after the image 
is aligned according to the rule, the margins are next to each other. Internet 
Explorer 6 and 7 render the image in the second line of the &amp;lt;p&amp;gt;. This is a bug.&lt;/p&gt;
&lt;p&gt;Rule 2 states that if the current box is left-floating, and there are any 
left-floating boxes generated by elements earlier in the source document, then 
for each such earlier box, either the left outer edge (the outer edge of the 
left margin) of the current box must be to the right of the right outer edge 
(the outer edge of the right margin) of the earlier box, or its top must be 
lower than the bottom of the earlier box. Analogous rules hold for 
right-floating boxes.&lt;/p&gt;
&lt;p&gt;What this means is that the outer edge of the margin of a left-floated 
element will be aligned to the outer margin edge of an earlier-occuring 
left-floated element. If there is insufficient space for the later-occuring 
floated element&amp;#39;s box, it&amp;#39;s top margin&amp;#39;s outer edge will be aligned to the 
earlier-occuring left-floated element&amp;#39;s bottom margin&amp;#39;s outer edge. 
Right-floated elements are handled in a similar way, but aligned to the right.&lt;/p&gt;
&lt;p&gt;Therefore, elements that are floated to the same side will not overlap each 
other.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;padding:10px;border:dashed 10px steelblue&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; five 
boxin&amp;lt;img src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;image 3&amp;quot; style=&amp;quot;padding:10px;border:solid 5px 
slategray; background-color:palegreen;margin:5px;float:left&amp;quot;&amp;gt;g w&amp;lt;img 
src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;image 3&amp;quot; style=&amp;quot;padding:10px;border:solid 5px slategray; 
background-color:palegreen;margin:5px;float:left&amp;quot;&amp;gt;izards jump quickly, the quick 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGSUk6_0I/AAAAAAAAAb4/sxaIUdjq2Oc/s1600-h/float_testing_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGSUk6_0I/AAAAAAAAAb4/sxaIUdjq2Oc/s320/float_testing_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the second left-floated image is to the right of the 
first left-floated image. The margin between them is 10px (5px + 5px). Internet 
Explorer 6 and 7 render the image in the second line of the &amp;lt;p&amp;gt;. This is a bug.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;float:left&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt; &amp;lt;p 
class=&amp;quot;test&amp;quot; style=&amp;quot;float:left&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGTTbQ_HI/AAAAAAAAAcA/q7PJVKorIbM/s1600-h/float_testing_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGTTbQ_HI/AAAAAAAAAcA/q7PJVKorIbM/s320/float_testing_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, there is insufficient space to render the second 
floated &amp;lt;p&amp;gt; next to the first floated &amp;lt;p&amp;gt;. Therefore it is rendered below it.&lt;/p&gt;
&lt;p&gt;Rule 3 states that the right outer edge of a left-floating box may not be to 
the right of the left outer edge of any right-floating box that is to the right 
of it. Analogous rules hold for right-floating elements.&lt;/p&gt;
&lt;p&gt;Therefore, elements that are floated to opposite sides will never overlap 
each other.&lt;/p&gt;
&lt;p&gt;What this means is that the outer edge of the right margin of a left floated 
element will be next to the outer edge of the left margin of a right floated 
element when there is just sufficient horizontal space for the floated elements. 
If there is extra space, it will appear between the margins of the two floated 
elements. When there is insufficient space, the second floated element&amp;#39;s margin 
box will be rendered just below the first floated element&amp;#39;s margin box.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;padding:10px;border:dashed 10px steelblue&amp;quot;&amp;gt;&amp;lt;img 
src=&amp;quot;image4.png&amp;quot; alt=&amp;quot;image 4&amp;quot; style=&amp;quot;float:right;padding:10px;border:solid 5px 
saddlebrown; background-color:bisque;margin:5px&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image4.png&amp;quot; 
alt=&amp;quot;image 4&amp;quot; style=&amp;quot;float:left;padding:10px;border:solid 5px yellowgreen; 
background-color:darkseagreen;margin:5px&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S6dGUVP9t-I/AAAAAAAAAcI/xIWGXCWl0WU/s1600-h/float_testing_4-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S6dGUVP9t-I/AAAAAAAAAcI/xIWGXCWl0WU/s320/float_testing_4-1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S6dGUVP9t-I/AAAAAAAAAcI/xIWGXCWl0WU/s1600-h/float_testing_4-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the space available in the &amp;lt;p&amp;gt; depends on the width of 
the viewport. The first picture shows how the floated images are positioned when 
there is sufficient space in the &amp;lt;p&amp;gt; for each image&amp;#39;s margin box. The second 
picture shows how the floated images are positioned when there is insufficient 
space in the &amp;lt;p&amp;gt; &amp;mdash; the second floated image is rendered below the first 
floated image. &lt;/p&gt;
&lt;p&gt;Rule 4 states that a floating box&amp;#39;s outer top may not be higher than the top 
of its containing block. When the float occurs between two collapsing margins, 
the float is positioned as if it had an otherwise empty anonymous block parent 
taking part in the flow.&lt;/p&gt;
&lt;p&gt;What this means is that the outer edge of the top margin of a floated element 
cannot be higher than the inner edge of the top margin of its containing block. 
However, if the preceding element has a bottom margin and the succeeding element 
has a top margin, these margins will collapse because they will be adjoining to each 
other. In such a case, the floated element will behave as if it had another 
block level parent. &lt;/p&gt;
&lt;p&gt;Since the margins of inline elements never collapse, the second part of Rule 
4 does not apply to inline elements.&lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin:5px;padding:0&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt; &amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;float:left;margin:5px;padding:0;background: none peru&amp;quot;&amp;gt; the five&amp;lt;/p&amp;gt; &amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin:5px;padding:0&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the quick brown fox jumps&amp;lt;/span&amp;gt; over the 
lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGWlUj-CI/AAAAAAAAAcY/PHExHhtYBcM/s1600-h/float_testing_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGWlUj-CI/AAAAAAAAAcY/PHExHhtYBcM/s320/float_testing_5.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Rule 5 states that the outer top of a floating box may not be higher than the 
outer top of any block or floated box generated by an element earlier in the 
source document.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:160px;height: 
  200px;padding:10px;border:dashed 10px steelblue&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image3.png&amp;quot; 
  alt=&amp;quot;image 3&amp;quot; 
  style=&amp;quot;float:right;vertical-align:bottom;padding:10px;border:solid 5px 
  slategray; background-color:palegreen;margin:5px&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image3.png&amp;quot; 
  alt=&amp;quot;image 3&amp;quot; 
  style=&amp;quot;float:left;vertical-align:bottom;padding:10px;border:solid 5px 
  palevioletred; background-color:darkorchid;margin:5px&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGZNnXH5I/AAAAAAAAAcg/YaVtNWHi0Z8/s1600-h/float_testing_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGZNnXH5I/AAAAAAAAAcg/YaVtNWHi0Z8/s320/float_testing_6.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, because there is insufficient horizontal space, the 
second float is rendered below the first, even though the second float appears 
at the left. This demonstrates Rule 5.&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:160px;height:190px&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; 
style=&amp;quot;float:left;padding:10px;background-color:orangered&amp;quot;&amp;gt; &amp;lt;img 
src=&amp;quot;image4.png&amp;quot; alt=&amp;quot;100x100 image&amp;quot; 
style=&amp;quot;float:left;padding:5px;background-color:aquamarine&amp;quot;&amp;gt; &amp;lt;img 
src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; style=&amp;quot;float:left&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGcDMXl5I/AAAAAAAAAco/PxHXvvEm6a8/s1600-h/float_testing_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGcDMXl5I/AAAAAAAAAco/PxHXvvEm6a8/s320/float_testing_7.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the third image&amp;#39;s outer top is in line with the margin 
box of the second floated image even though there is enough place for it next to 
the first image. This is in accordance with Rule 5. &lt;/p&gt;
&lt;p&gt;Rule 6: The outer top of an element&amp;#39;s floating box may not be higher than the 
top of any line-box containing a box generated by an element earlier in the 
source document.&lt;/p&gt;
&lt;p&gt;Another way of putting it is: The outer edge of the margin of a floated 
element must be at the same height or lower than the inner edge of the padding 
of any line box that has content whose source code appears earlier than the 
floated element&amp;#39;s.&lt;/p&gt;
&lt;p&gt;Content whose source code appears earlier than a particular element&amp;#39;s source 
code is usually on the same line as the element. However, when there is 
insufficient space for an element, it is rendered on the next line. In this 
case, if the element is floated, it will float on the next line.&lt;/p&gt;
&lt;p&gt;Rule 7: A left-floating box that has another left-floating box to its left 
may not have its right outer edge to the right of its containing block&amp;#39;s right 
edge. An analogous rule holds for right-floating elements.&lt;/p&gt;
&lt;p&gt;Example 8: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:100px;height:100px&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; 
style=&amp;quot;float:left;margin:5px;&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; 
style=&amp;quot;float:left;margin:5px;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGm3hQKgI/AAAAAAAAAcw/3Ox_uVrsW8k/s1600-h/float_testing_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGm3hQKgI/AAAAAAAAAcw/3Ox_uVrsW8k/s320/float_testing_8.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Rule 8: A floating box must be placed as high as possible.&lt;/p&gt;
&lt;p&gt;Rule 8 specifies that floated elements that have been positioned according to 
Rule 2, Rule 5 and Rule 6 have to be positioned as high as possible. Rule 2 
specifies two possible positions for a floated box &amp;mdash; one lower than the 
other, Rule 5 specifies that the float be positioned at the same height or lower 
than a particular margin and Rule 6 specifies that a float must be positioned at 
the same height or lower than a particular padding. Therefore, Rule 8 specifies 
that the highest possible position must be chosen.&lt;/p&gt;
&lt;p&gt;Rule 9: A left-floating box must be put as far to the left as possible, a 
right-floating box as far to the right as possible. A higher position is 
preferred over one that is further to the left/right.&lt;/p&gt;
&lt;p&gt;Rule 1, Rule 2, and Rule 3 specify the specify the limit of how much to the 
right or left a floated element can be positioned. Rule 9 specifies that 
elements positioned according to those rules must be positoned as left as 
possible (for left floated elements) or as right as possible (for right floated 
elements) while not going beyond the limits specified.&lt;/p&gt;
&lt;p&gt;Also, Rule 9 specifies that a floated element must be positioned higher but 
less to the left or right instead of lower but more to the left or right if 
those are the two available positions.&lt;/p&gt;
&lt;p&gt;Example 9: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;&amp;lt;img 
src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; style=&amp;quot;float:left;margin:5px;&amp;quot;&amp;gt;&amp;lt;img 
src=&amp;quot;image3.png&amp;quot; alt=&amp;quot;50x50 image&amp;quot; style=&amp;quot;float:left;margin:5px;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S6dGpcD7n6I/AAAAAAAAAc4/O45gNfokBkE/s1600-h/float_testing_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S6dGpcD7n6I/AAAAAAAAAc4/O45gNfokBkE/s320/float_testing_9.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the second floated image can also be placed below the 
first without violating rules 1 to 8. But because of rule 9, it is placed next 
to the first floated image.&lt;/p&gt;

&lt;h4&gt;Nested Floats&lt;/h4&gt;

&lt;p&gt;A floated element can contain floated descendants. A floated element will 
expand its height and width to accomodate a floated descendant&amp;#39;s height. Internet Explorer 6 and 7 do not obey this rule when rendering a floated 
element that contains floated descendants.&lt;/p&gt;
&lt;h4&gt;Negative Margins&lt;/h4&gt;
&lt;p&gt;Floated elements with negative margins obey all of the float rules. However, 
the outer edge of the margin box of a floated element with negative margins will 
be within the padding box of the element.&lt;/p&gt;
&lt;h5&gt;Floated Elements With Negative Margins Overlapping Other Elements&lt;/h5&gt;
&lt;p&gt;When a floated element has a negative top margin, it may overlap a preceding 
element. In such a case, the floated element&amp;#39;s text and the preceding element&amp;#39;s 
text overlap and the background color of the floated element appears behind the 
text.&lt;/p&gt;
&lt;p&gt;Example 10: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot; 
&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&amp;lt;p 
style=&amp;quot;margin-top:-40px;float:left;background:none 
cornsilk;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the five boxing wizards 
jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt; &lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGrc8qNpI/AAAAAAAAAdA/kg02aym8pm8/s1600-h/float_testing_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGrc8qNpI/AAAAAAAAAdA/kg02aym8pm8/s320/float_testing_10.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When a floated element overlaps an element that appears after it in the 
source, the inline content of that element moves away so as not to overlap the 
floated content. The background color of the floated element appears behind the 
text.&lt;/p&gt;
&lt;p&gt;Example 11: &lt;code&gt;&amp;lt;p style=&amp;quot;float:left;background:none 
cornsilk;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the quick&amp;lt;/p&amp;gt; &amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the five boxing wizards 
jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGtDP393I/AAAAAAAAAdI/YXcc7oiLDFU/s1600-h/float_testing_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S6dGtDP393I/AAAAAAAAAdI/YXcc7oiLDFU/s320/float_testing_11.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;According to the &lt;a href="http://www.w3.org/TR/CSS21/visuren.html#floats"&gt;CSS 
2.1 specification&lt;/a&gt;, when a float overlaps inline boxes (using negative 
margins), the inline boxes are rendered on top of the floated element&amp;#39;s box.&lt;/p&gt;
&lt;p&gt;Example 12: &lt;code&gt;&amp;lt;p style=&amp;quot;width:580px;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;&amp;quot;&amp;gt;the quick brown fox jumps &amp;lt;span style=&amp;quot;background:none blueviolet&amp;quot;&amp;gt;over 
the lazy&amp;lt;/span&amp;gt; dog. the five boxing &amp;lt;span style=&amp;quot;background:none 
gold&amp;quot;&amp;gt;wizards.&amp;lt;/span&amp;gt; &amp;lt;span 
style=&amp;quot;float:right;margin-top:-20px;margin-left:-50px&amp;quot;&amp;gt;jump quickly&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGujY7CsI/AAAAAAAAAdQ/mb5bFCmJfxY/s1600-h/float_testing_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGujY7CsI/AAAAAAAAAdQ/mb5bFCmJfxY/s320/float_testing_12.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;A floated element&amp;#39;s box is rendered on top of block boxes that it overlaps. 
However, if the contents of the block box are inline boxes, then the inline 
boxes will be rendered on top of the floated element&amp;#39;s box.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;float:none&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Since &lt;code&gt;none&lt;/code&gt; is the initial value of float, the declaration &lt;code&gt;
float:none&lt;/code&gt; is only useful to override another float declaration that was 
applied to an element.&lt;/p&gt;
&lt;h4&gt;float:inherit&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;float&lt;/code&gt; is not an inherited property. However, using the &lt;code&gt;
float:inherit&lt;/code&gt; declaration, an element can be made to inherit its parent 
element&amp;#39;s float value.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;float:inherit&lt;/code&gt; 
declaration.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-6759671675303425888?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/6759671675303425888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=6759671675303425888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6759671675303425888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/6759671675303425888'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/03/float-property.html' title='The float Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__ZdUHId0XUA/S6dGRfl0fDI/AAAAAAAAAbw/8J2RSnxja6U/s72-c/float_testing_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-8617074258880964911</id><published>2010-03-13T16:19:00.003+05:30</published><updated>2010-03-13T17:03:01.675+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='property'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Background Properties</title><content type='html'>&lt;p&gt;The &lt;dfn&gt;background&lt;/dfn&gt; of an element is the area over which the content 
area, padding and borders are drawn. Note that an element&amp;#39;s background does not 
appear in its margin.&lt;/p&gt;

&lt;p&gt;There are six background properties in CSS &amp;mdash; &lt;code&gt;background-color&lt;/code&gt;, 
&lt;code&gt;background-image&lt;/code&gt;, &lt;code&gt;background-attachment&lt;/code&gt;, 
&lt;code&gt;background-repeat&lt;/code&gt;, &lt;code&gt;background-position&lt;/code&gt;, and &lt;code&gt;background&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;The &lt;code&gt;background-color&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;This property specifies the color of the background of an element. It can 
accept as values, color keywords, system color keywords, hexadecimal color 
notation, decimal functional rgb notation, percentage functional rgb notation 
and the keywords &lt;code&gt;transparent&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;; See
&lt;a href="http://destination-code.blogspot.com/2008/09/css-values-colors.html"&gt;
Specifying Color in CSS&lt;/a&gt;. Its initial value is &lt;code&gt;transparent&lt;/code&gt;. The
&lt;code&gt;background-color&lt;/code&gt; property can be applied to any element. It is not 
an inherited property. &lt;/p&gt;

&lt;p&gt;Below is an example of &lt;code&gt;background-color&lt;/code&gt; applied to a block 
element.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;margin:10px;border: 5px black 
dashed;padding:15px;height:80px;background-color:aqua;font-size:35px;font-family:&amp;#39;TimesNew 
Roman&amp;#39;&amp;quot;&amp;gt; the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tm6wEVvNI/AAAAAAAAAYQ/0HgPFQy1V8c/s1600-h/background-color_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tm6wEVvNI/AAAAAAAAAYQ/0HgPFQy1V8c/s320/background-color_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;In the above example, the background color can be seen behind the content 
area, padding and border (but not the margin). In Internet Explorer 6 and 7, due 
to a bug, the background color does not appear behind the border. This buggy 
behavior is seen on all elements that have &lt;code&gt;hasLayout&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Below is an example of &lt;code&gt;background-color&lt;/code&gt; applied to an inline 
non-replaced element (a &lt;code&gt;span&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;TimesNew Roman&amp;#39;&amp;quot;&amp;gt;the 
five boxing &amp;lt;span style=&amp;quot;background-color:royalblue&amp;quot;&amp;gt;wizards jump&amp;lt;/span&amp;gt; 
quickly. the quick brown &amp;lt;span style=&amp;quot;margin:10px;border: 5px lightblue 
dashed;padding:15px;height:80px;background-color:rgb(205,92,92)&amp;quot;&amp;gt;fox 
jumps&amp;lt;/span&amp;gt; over the lazy dog. the five &amp;lt;span 
style=&amp;quot;background-color:hotpink&amp;quot;&amp;gt;boxing wizards&amp;lt;/span&amp;gt; jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tm8rrT5YI/AAAAAAAAAYY/mBEqrBqqe3c/s1600-h/background-color_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tm8rrT5YI/AAAAAAAAAYY/mBEqrBqqe3c/s320/background-color_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, since the browser does not allocate extra space for the 
second span&amp;#39;s top and bottom border and padding, they overlap the text that is 
above and below. The background color of the second span covers the first span&amp;#39;s 
backround color. This is because text that appears later in an (X)HTML document 
is higher in the stacking order. For the same reason, the background color of 
the third span covers the background color of the second span. Note, however, 
that the second span&amp;#39;s background color appears behind the text below that does 
not have a background color specified. This is because, by default, text has a 
transparent background.&lt;/p&gt;
&lt;p&gt;Below is an example of what happens when block elements with background 
colors overlap each other.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;TimesNew 
Roman&amp;#39;;background-color:orchid;width: 200px&amp;quot;&amp;gt;abcdefg hijkl&amp;lt;/p&amp;gt; &lt;br&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;TimesNew 
Roman&amp;#39;;margin-top:-35px;margin-bottom:-35px;background-color:palegoldenrod&amp;quot;&amp;gt;the 
five boxing wizards jump quickly. the quick brown fox jumps over the lazy 
dog&amp;lt;/p&amp;gt; &lt;br&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;TimesNew 
Roman&amp;#39;;background-color:lightsalmon;width: 200px&amp;quot;&amp;gt;abcdefg hijkl&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnCW5OP0I/AAAAAAAAAYg/SyTBTB1oM-s/s1600-h/background-color_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnCW5OP0I/AAAAAAAAAYg/SyTBTB1oM-s/s320/background-color_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The above example shows that block elements that come later in the (X)HTML 
document are higher in the stacking order. Because of this, the last &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&amp;#39;s 
background color cover the second&amp;#39;s and the second&amp;#39;s covers the first&amp;#39;s. 
However, unlike in inline elements, the text of any of the three &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;s 
is not covered by a background color. In Internet Explorer 6 and 7, the text is 
also covered by the background color. This is a bug.&lt;/p&gt;
&lt;p&gt;Below is an example of &lt;code&gt;background-color&lt;/code&gt; applied to an inline 
replaced element (an image).&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;TimesNew Roman&amp;#39;&amp;quot;&amp;gt;the 
quick &amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; 
style=&amp;quot;background-color:mediumspringgreen;padding:5px&amp;quot;&amp;gt;brown fox jumps over the 
lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnFA8LvDI/AAAAAAAAAYo/vdmPHnHNn6I/s1600-h/background-color_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnFA8LvDI/AAAAAAAAAYo/vdmPHnHNn6I/s320/background-color_4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The background color on the image can only be seen when the image has 
padding.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;background-color:transparent&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;transparent&lt;/code&gt; is the initial value of &lt;code&gt;background-color&lt;/code&gt;, therefore 
all elements have a transparent background unless otherwise specified. 
Therefore, the &lt;code&gt;background-color:transparent&lt;/code&gt; declaration can be used 
to override a background color that has been already applied to an element.&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;background-color:inherit&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;background-color&lt;/code&gt; is not, by default, an inherited property. 
However, the background color of an element appears in its child elements 
because the initial value of &lt;code&gt;background-color&lt;/code&gt; is &lt;code&gt;transparent&lt;/code&gt;. 
Since the background color of an element is, by default, transparent, the 
specified background color of an ancestor element will show through.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and 7 ignore CSS declarations containing the &lt;code&gt;
inherit&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;background-color:inherit&lt;/code&gt; causes an element to inherit its 
parent&amp;#39;s background color. The effect of the &lt;code&gt;background-color:inherit&lt;/code&gt; 
can only be observed in certain situations &amp;mdash; two examples are shown below.&lt;/p&gt;

&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:red;background-color:white;background-image:url(&amp;#39;pattern.bmp&amp;#39;)&amp;quot;&amp;gt;the 
quick &amp;lt;span style=&amp;quot;background-color:inherit&amp;quot;&amp;gt;brown&amp;lt;/span&amp;gt; fox jumps over the 
lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnHmeTMxI/AAAAAAAAAYw/75l-IQgs1Rg/s1600-h/background-color_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnHmeTMxI/AAAAAAAAAYw/75l-IQgs1Rg/s320/background-color_5.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-color:white&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the 
five &amp;lt;span style=&amp;quot;background-color:inherit;padding-top:20px&amp;quot;&amp;gt;boxing 
wizards&amp;lt;/span&amp;gt; jump quickly. the quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnJUBVmnI/AAAAAAAAAY4/8aA_ee10jMo/s1600-h/background-color_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnJUBVmnI/AAAAAAAAAY4/8aA_ee10jMo/s320/background-color_6.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;The &lt;code&gt;background-image&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;This property specifies an image that will appear as the background of the 
content area, padding and border of an element. This property can be applied to 
any element. An element can have only one 
background image. &lt;code&gt;background-image&lt;/code&gt; can take as values a URL, the keyword &lt;code&gt;
none&lt;/code&gt; and the keyword &lt;code&gt;inherit&lt;/code&gt;. Here, &lt;dfn&gt;URL&lt;/dfn&gt; is the 
address of an image file. The URL is within quotes and the whole expression is 
within parentheses, prefixed with &lt;code&gt;
url&lt;/code&gt; . Putting the URL withing single or double quotes is optional. The 
initial value of &lt;code&gt;background-image&lt;/code&gt; is &lt;code&gt;none&lt;/code&gt;. It is not 
an inherited property.&lt;/p&gt;

&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(&amp;#39;star.gif&amp;#39;);padding:0&amp;quot;&amp;gt;the quick brown fox jumps 
over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5trWVky86I/AAAAAAAAAbo/mYrhJZZaXD8/s1600-h/star.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5trWVky86I/AAAAAAAAAbo/mYrhJZZaXD8/s320/star.gif" /&gt;&lt;/a&gt;(Image taken from &lt;a href="http://www.google.com/chrome"&gt;Google 
Chrome&lt;/a&gt;)&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnL66ag3I/AAAAAAAAAZA/dIJsXs-ZjuY/s1600-h/background-image_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnL66ag3I/AAAAAAAAAZA/dIJsXs-ZjuY/s320/background-image_7.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the background image is aligned to the top left corner of the 
content area of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, and then tiled horizontally and 
vertically. By default, background images are vertically and horizontally tiled.&lt;/p&gt;
&lt;p&gt;Example 8: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(&amp;#39;star.gif&amp;#39;);background-attachment:scroll;padding:10px;border: 
dashed powderblue 10px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnNt9QueI/AAAAAAAAAZI/T8ZHqbZd30o/s1600-h/background-image_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnNt9QueI/AAAAAAAAAZI/T8ZHqbZd30o/s320/background-image_8.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; has both padding and a border. 
Therefore, the image is aligned to the top left corner of the padding (the outer 
edge of the padding), and then tiled vertically and horizontally. Internet 
Explorer 6 and 7 align the background image to the top left corner of the border 
(the outer edge of the border).&lt;/p&gt;
&lt;p&gt;Inline replaced and non-replaced elements can also have background images. 
Only when an image has padding or a border, or when the image fails to load, can 
its background image be seen.&lt;/p&gt;
&lt;p&gt;Example 9: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the 
&amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; 
style=&amp;quot;background-image:url(star.gif);padding:10px;border: 10px dotted 
darkseagreen&amp;quot;&amp;gt;quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnPs_r2WI/AAAAAAAAAZQ/40WX7GCVmd8/s1600-h/background-image_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnPs_r2WI/AAAAAAAAAZQ/40WX7GCVmd8/s320/background-image_9.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h5&gt;&lt;code&gt;background-image:none&lt;/code&gt;&lt;/h5&gt;
 
 

&lt;p&gt;&lt;code&gt;none&lt;/code&gt; is the default value of the &lt;code&gt;background-image&lt;/code&gt; 
property. Therefore, it is only useful to override another &lt;code&gt;
background-image&lt;/code&gt; declaration that matches an element.&lt;/p&gt;
 
 

&lt;h5&gt;&lt;code&gt;background-image:inherit&lt;/code&gt;&lt;/h5&gt;
 
 

&lt;p&gt;&lt;code&gt;background-image&lt;/code&gt; is not an inherited property. However, since an 
element&amp;#39;s background is by default transparent, any background image of an 
ancestor element can be seen within it. The &lt;code&gt;background-image:inherit&lt;/code&gt; declaration 
causes the background image of an element&amp;#39;s parent to appear within it, aligned 
to the top left corner of the element&amp;#39;s box.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and 7 ignore &lt;code&gt;background-image:inherit&lt;/code&gt; 
declarations.&lt;/p&gt;
&lt;p&gt;Example 10: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif)&amp;quot;&amp;gt;five &amp;lt;span 
style=&amp;quot;background-image:inherit&amp;quot;&amp;gt;quick&amp;lt;/span&amp;gt; brown foxes jump over the lazy 
dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnRhLM1rI/AAAAAAAAAZY/2q9jfS-LOto/s1600-h/background-image_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S5tnRhLM1rI/AAAAAAAAAZY/2q9jfS-LOto/s320/background-image_10.png" /&gt;&lt;/a&gt;&lt;/div&gt;
 
 
&lt;h4&gt;The &lt;code&gt;background-repeat&lt;/code&gt; Property&lt;/h4&gt;
 
 

&lt;p&gt;This property specifies whether or not a background image is tiled or 
not and, if it is, whether it is tiled vertically, horizontally or both. The 
background-repeat property can take the values &lt;code&gt;repeat&lt;/code&gt;, &lt;code&gt;
repeat-x&lt;/code&gt;, &lt;code&gt;repeat-y&lt;/code&gt;, &lt;code&gt;no-repeat&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. 
The initial value is &lt;code&gt;repeat&lt;/code&gt;.This is not an inherited property.&lt;/p&gt;
 
 

&lt;h5&gt;&lt;code&gt;background-repeat:repeat-x&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;This declaration causes the background image to be tiled horizontally (the 
x-axis) only.&lt;/p&gt;
 
 

&lt;p&gt;Example 11: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-repeat:repeat-x;border:10px 
limegreen double&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tnXb1X2lI/AAAAAAAAAZg/OrKGJH4qL8U/s1600-h/background-repeat_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tnXb1X2lI/AAAAAAAAAZg/OrKGJH4qL8U/s320/background-repeat_11.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, note how the background image in the border is 
vertically aligned with the background images of the content area of the &lt;code&gt;
&amp;lt;p&amp;gt;&lt;/code&gt;. In Internet Explorer 6 and 7 the background image is aligned to the 
outer top left edge of the border. This is a bug.&lt;/p&gt;
 
 

&lt;h5&gt;&lt;code&gt;background-repeat:repeat-y&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;This declaration causes the background image to be tiled vertically (the 
y-axis) only.&lt;/p&gt;
 
 

&lt;p&gt;Example 12: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-repeat:repeat-y;border:10px 
cadetblue double&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnctqV7MI/AAAAAAAAAZo/EnMh0rMaoY4/s1600-h/background-repeat_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnctqV7MI/AAAAAAAAAZo/EnMh0rMaoY4/s320/background-repeat_12.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, note how the background image in the border is 
horizontally aligned with the background images of the content area of the &lt;code&gt;
&amp;lt;p&amp;gt;&lt;/code&gt;. In Internet Explorer 6 and 7, the background image is aligned to the 
outer top left edge of the border. This is a bug.&lt;/p&gt;
 
 

&lt;h5&gt;&lt;code&gt;background-repeat:no-repeat&lt;/code&gt;&lt;/h5&gt;
 
 
&lt;p&gt;With this declaration, the background image is not tiled at all.&lt;/p&gt;
 
 

&lt;p&gt;Example 13: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-repeat:no-repeat;border: 10px 
rosybrown double&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tne4hFhTI/AAAAAAAAAZw/FiH3AWahaOE/s1600-h/background-repeat_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tne4hFhTI/AAAAAAAAAZw/FiH3AWahaOE/s320/background-repeat_13.png" /&gt;&lt;/a&gt;&lt;/div&gt;
 

&lt;p&gt;In the above example, note that the background image does not appear in the 
border at all. Internet Explorer 6 and 7, the background image is aligned to the 
outer top left edge of the border. This is a bug.&lt;/p&gt;
 

&lt;h5&gt;&lt;code&gt;background-repeat:repeat&lt;/code&gt;&lt;/h5&gt;
 
&lt;p&gt;This declaration is causes the background image to tile both horizontally and 
vertically. Since this is the initial value of the &lt;code&gt;background-repeat&lt;/code&gt; 
property, this declaration is only useful to override another &lt;code&gt;
background-repeat&lt;/code&gt; declaration that matches an element.&lt;/p&gt;
 
 
&lt;h5&gt;&lt;code&gt;background-repeat:inherit&lt;/code&gt;&lt;/h5&gt;
 
 
&lt;p&gt;Since &lt;code&gt;background-repeat&lt;/code&gt; is not an inherited property, the &lt;code&gt;background-repeat:inherit&lt;/code&gt; declaration can be used 
to make an element inherit its parent&amp;#39;s &lt;code&gt;background-repeat&lt;/code&gt; value. 
Internet Explorer 6 and 7 ignore this declaration.&lt;/p&gt;
 
 
&lt;p&gt;Example 14: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-repeat:repeat-y&amp;quot;&amp;gt;the &amp;lt;span 
style=&amp;quot;background-image:url(star_i.gif);background-repeat:inherit&amp;quot;&amp;gt;quick&amp;lt;/span&amp;gt; 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt; &lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnhAyFtqI/AAAAAAAAAZ4/zvXie5viTfk/s1600-h/background-repeat_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tnhAyFtqI/AAAAAAAAAZ4/zvXie5viTfk/s320/background-repeat_14.png" /&gt;&lt;/a&gt;&lt;/div&gt;
 
 
&lt;h4&gt;The &lt;code&gt;background-attachment&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;This property controls whether or not the background image scrolls when the web page is scrolled by the user. This property takes the 
values &lt;code&gt;scroll&lt;/code&gt;, &lt;code&gt;fixed&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. The 
initial value is &lt;code&gt;scroll&lt;/code&gt;. &lt;code&gt;background-attachment&lt;/code&gt; is not 
an inherited property.&lt;/p&gt;
 
 
&lt;h5&gt;&lt;code&gt;background-attachment:fixed&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;This declaration causes the background image of an element to be aligned with 
the top left corner of the viewport. The alignment 
can be changed using the &lt;code&gt;background-position&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;background-attachment:fixed&lt;/code&gt;, the background image in an 
element appears in the position that it would have if it was tiled from the top 
left corner of the viewport. However, if the &lt;code&gt;background-repeat&lt;/code&gt; property is set 
to &lt;code&gt;no-repeat&lt;/code&gt;, the background image will not be tiled. Therefore, in 
such a case, the background image will be visible only when the element&amp;#39;s box is 
close to the top left corner of the viewport. Similarly, if the &lt;code&gt;
background-repeat&lt;/code&gt; property has a value of &lt;code&gt;repeat-x&lt;/code&gt; the 
background image will be visible only when the element&amp;#39;s box appears towards the 
top of the viewport. With &lt;code&gt;repeat-y&lt;/code&gt;, the background image will be 
visible only when the element is close to the left side of the viewport. Since the background image is aligned with the 
viewport, it does not move unless the viewport is resized. Therefore, when the 
user scrolls the web page, a fixed background image does not move with the rest 
of the element.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 renders &lt;code&gt;background-attachment:fixed&lt;/code&gt; 
correctly on the &lt;code&gt;html&lt;/code&gt; element. &lt;code&gt;background-attachment:fixed&lt;/code&gt; 
is rendered correctly only when the &lt;code&gt;body&lt;/code&gt; element is the same size 
as the viewport.&lt;/p&gt;
&lt;p&gt;Example 15: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-attachment:fixed&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 does not render the background image&amp;#39;s position fixed to 
the viewport. This is a bug. Internet Explorer 7 vertically misalignes the 
background image by 1px &amp;mdash; it renders the background image one pixel lower 
than it should. &lt;/p&gt;
&lt;p&gt;Example 16: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-attachment:fixed;background-repeat:repeat-x&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the background image of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; can be 
seen only when the element is scrolled to the top of the viewport. Internet 
Explorer 6 does not render the background image&amp;#39;s position fixed to the 
viewport. This is a bug. Internet Explorer 7 does not render the background 
image at all — the background image cannot be seen even when the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
is scrolled to the top of the viewport. This is a bug.&lt;/p&gt;
&lt;p&gt;Example 17: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-attachment:fixed;background-repeat:repeat-y&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnrf0CGkI/AAAAAAAAAaA/z_oOgpoBj3g/s1600-h/background-attachment_17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tnrf0CGkI/AAAAAAAAAaA/z_oOgpoBj3g/s320/background-attachment_17.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the background image can be seen on the left side of 
the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;. It is aligned to the left edge of the viewport. Internet 
Explorer 6 does not render the background image&amp;#39;s position fixed to the 
viewport. This is a bug.&lt;/p&gt;
&lt;p&gt;Example 18: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-attachment:fixed;background-repeat:no-repeat&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the above example, the background image of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; can be 
seen only when the element is scrolled to the top of the viewport. Internet 
Explorer 6 does not render the background image&amp;#39;s position fixed to the 
viewport. This is a bug. Internet Explorer 7 does not render the background 
image at all — the background image cannot be seen even when the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
is scrolled to the top of the viewport. This is a bug.&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;background-attachment:scroll&lt;/code&gt;&lt;/h5&gt;

 
 
&lt;p&gt;&lt;code&gt;scroll&lt;/code&gt; is the initial value of &lt;code&gt;background-attachment&lt;/code&gt;. 
Therefore, the &lt;code&gt;background-attachment:scroll&lt;/code&gt; declaration is only 
useful to override another &lt;code&gt;background-attachment&lt;/code&gt; declaration that 
matches an element.&lt;/p&gt;

 
 
&lt;h5&gt;&lt;code&gt;background-attachment:inherit&lt;/code&gt;&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;background-attachment&lt;/code&gt; is not an inherited property. However, the
&lt;code&gt;background-attachment:inherit&lt;/code&gt; will cause an element to inherit its 
parent element&amp;#39;s &lt;code&gt;background-attachment&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and 7 ignore the &lt;code&gt;inherit&lt;/code&gt; value.&lt;/p&gt;

 
 
&lt;p&gt;Example 19: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-attachment:scroll&amp;quot;&amp;gt;the &amp;lt;span 
style=&amp;quot;background-image:url(star_i.gif);background-attachment:inherit&amp;quot;&amp;gt;quick&amp;lt;/span&amp;gt; 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

 
 
&lt;h4&gt;The &lt;code&gt;background-position&lt;/code&gt; Property&lt;/h4&gt;

 
 
&lt;p&gt;This property specifies the position of the background image with respect to 
the top left corner of an element&amp;#39;s padding box (in the case of &lt;code&gt;
background-attachment:scroll&lt;/code&gt;) or with respect to the top left corner of 
the viewport (in the case of &lt;code&gt;background-attachment:fixed&lt;/code&gt;). This property can only be applied on block-level and replaced elements 
(inline or block). It is not an inherited property. Its inital value is &lt;code&gt;0% 
0%&lt;/code&gt;. It can take length values, percentages and the keywords &lt;code&gt;top&lt;/code&gt;,
&lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;
and &lt;code&gt;inherit&lt;/code&gt;. The &lt;code&gt;background-position&lt;/code&gt; property can take 
either one or two space-separated values.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and 7 position the background image with respect to the 
outer edge of the border instead of the outer edge of the padding. This is a bug.&lt;/p&gt;

 
 
&lt;h5&gt;&lt;code&gt;background-position&lt;/code&gt; with Keywords&lt;/h5&gt;
&lt;p&gt;The keywords applicable to &lt;code&gt;background-position&lt;/code&gt; are &lt;code&gt;top&lt;/code&gt;,
&lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;. &lt;code&gt;background-position&lt;/code&gt; can take either one or two keyword values. 
If a &lt;code&gt;background-position&lt;/code&gt; declaration has only one keyword value, 
the other keyword value is assumed to be &lt;code&gt;center&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;With keywords, the &lt;dfn&gt;starting position&lt;/dfn&gt; of a background image is the 
position at which the background image is located after aligning its top left 
corner to the point specified. If the element has the declaration &lt;code&gt;
background-repeat:repeat&lt;/code&gt; then the background image is tiled in all four 
directions starting from the starting position. If the element has the 
declaration &lt;code&gt;background-repeat:repeat-x&lt;/code&gt; or &lt;code&gt;
background-repeat:repeat-y&lt;/code&gt;, then the image is tiled left and right or up 
and down, respectively, from the starting position. If the element has &lt;code&gt;
background-repeat:no-repeat&lt;/code&gt;, then the background image is displayed at 
the starting position without tiling.The &lt;code&gt;top&lt;/code&gt; 
and &lt;code&gt;bottom&lt;/code&gt; keywords specify the starting alignment of 
the background image on the &lt;code&gt;y&lt;/code&gt;-axis (vertical axis), &lt;code&gt;left&lt;/code&gt; 
and &lt;code&gt;right&lt;/code&gt; specify the starting alignment of the background image on 
the &lt;code&gt;x&lt;/code&gt;-axis (horizontal axis) and center refers to a point that is 
equidistant from the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; axes (the horizontal and 
vertical center of an element&amp;#39;s padding box).&lt;/p&gt;

 
 
&lt;p&gt;Example 20: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-position:top right&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

 
 
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tnzrQq8TI/AAAAAAAAAaI/4MV1EJe8kzQ/s1600-h/background-position_20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tnzrQq8TI/AAAAAAAAAaI/4MV1EJe8kzQ/s320/background-position_20.png" /&gt;&lt;/a&gt;&lt;/div&gt;

 
 
&lt;p&gt;In the above example, the background image is truncated at the left and at 
the bottom. This indicates top right alignment.&lt;/p&gt;
&lt;p&gt;The order of the keywords is not important &amp;mdash; &lt;code&gt;background-position:top 
right&lt;/code&gt; and &lt;code&gt;background-position: right top&lt;/code&gt; are equivalent.&lt;/p&gt;

 
 
&lt;p&gt;Example 21: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-position:top 
right;background-repeat:repeat-x&amp;quot;&amp;gt;the quick brown fox jumps over the lazy 
dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

 
 
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tn1QYDPLI/AAAAAAAAAaQ/yVaHy9kfTs8/s1600-h/background-position_21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tn1QYDPLI/AAAAAAAAAaQ/yVaHy9kfTs8/s320/background-position_21.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;In the above example, the background image is truncated at the left and 
aligned to the top. This indicates top right alignment.&lt;/p&gt;
&lt;p&gt;The keyword &lt;code&gt;center&lt;/code&gt; can refer either to the vertical alignment or 
the horizontal alignment of the background image. &lt;code&gt;center&lt;/code&gt; refers to 
vertical alignment when paired with horizontal alignment keywords &lt;code&gt;right&lt;/code&gt; 
or &lt;code&gt;left&lt;/code&gt;. &lt;code&gt;center&lt;/code&gt; refers to horizontal alignment when 
paired with vertical alignment keywords &lt;code&gt;top&lt;/code&gt; or &lt;code&gt;bottom&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 22: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(star.gif);background-position: center top&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tn2rAXVnI/AAAAAAAAAaY/tUo21n9lcU0/s1600-h/background-position_22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tn2rAXVnI/AAAAAAAAAaY/tUo21n9lcU0/s320/background-position_22.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the background image is truncated at the left, right 
and bottom. This indicates center top alignment.&lt;/p&gt;
&lt;p&gt;When the &lt;code&gt;background-position&lt;/code&gt; property has only a single keyword, 
the second keyword is assumed to be &lt;code&gt;center&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 23:&lt;code&gt; &amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-position:left;background-image:url(star.gif);background-repeat:no-repeat&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tn4xesHVI/AAAAAAAAAag/T7sH483y5lU/s1600-h/background-position_23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5tn4xesHVI/AAAAAAAAAag/T7sH483y5lU/s320/background-position_23.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the background image is positioned as if the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
had the declaration &lt;code&gt;background-position:left center&lt;/code&gt;.&lt;/p&gt;


&lt;p&gt;Below is a diagram showing all the combinations of &lt;code&gt;background-position&lt;/code&gt; 
keywords (except &lt;code&gt;inherit&lt;/code&gt;) with the resulting starting position of 
the background image.&lt;/p&gt;
&lt;p&gt;Example 24:&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tn7FoN44I/AAAAAAAAAao/RPTwOOLaq9Y/s1600-h/background-position_24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5tn7FoN44I/AAAAAAAAAao/RPTwOOLaq9Y/s320/background-position_24.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Internet Explorer 6 and 7 position the background image with respect to the 
outer edge of the border instead of the outer edge of the padding. This is a bug.&lt;/p&gt;
&lt;p&gt;Position keyword-valued &lt;code&gt;background-position&lt;/code&gt; declarations with 
the declaration &lt;code&gt;background-attachment:fixed&lt;/code&gt; cause the background 
image to be positioned with respect to the viewport. However, the background 
image is visible only in the border box of the element.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;background-position&lt;/code&gt; with Length Values&lt;/h5&gt;

&lt;p&gt;A &lt;code&gt;background-position&lt;/code&gt; declaration with length values specifies 
the horizontal and vertical offset of the background image. The &lt;code&gt;
background-position&lt;/code&gt; property can take a pair of length values or a single 
value. When this property has only one value, that value is considered to be the 
horizontal offset and the vertical position is considered to be &lt;code&gt;center&lt;/code&gt;.With 
two values, the first length value specifies the horizontal offset and the 
second length value specifies the vertical offset from the top left corner of 
the padding box (in case of &lt;code&gt;background-attachement:scroll&lt;/code&gt;) or from 
the top left corner of the viewport (in case of &lt;code&gt;
background-attachment:fixed&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Example 25: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-position:5px 15px;background-repeat: 
no-repeat;background-image:url(star.gif)&amp;quot;&amp;gt;the quick brown fox jumps over the 
lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tn9KNAQ9I/AAAAAAAAAaw/FFRk8YS2Nsw/s1600-h/background-position_25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5tn9KNAQ9I/AAAAAAAAAaw/FFRk8YS2Nsw/s320/background-position_25.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Mixing length values and position keywords is allowed. When the value of a 
background-declaration contains at least one length value, the first sub-value 
specifies the horizontal position or offset and the second sub-value specifies 
the vertical position or offset. In such cases, the first sub-value can be &lt;code&gt;
left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt; or a length value and the 
second sub-value can be &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt; 
or a length value.&lt;/p&gt;
&lt;p&gt;Example 26: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-position:5px bottom;background-repeat: 
no-repeat;background-image:url(star.gif)&amp;quot;&amp;gt;the quick brown fox jumps over the 
lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S5toB2smiuI/AAAAAAAAAa4/CYJ7GlPl3g0/s1600-h/background-position_26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S5toB2smiuI/AAAAAAAAAa4/CYJ7GlPl3g0/s320/background-position_26.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Negative length values are permitted in &lt;code&gt;background-position&lt;/code&gt; 
declarations. Large negative length values may cause a background image to be 
not visible at all.&lt;/p&gt;
&lt;p&gt;Example 27: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-position: -5px 
-5px;background-repeat:no-repeat;background-image:url(star.gif)&amp;quot;&amp;gt; the quick 
brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S5toDeGBLtI/AAAAAAAAAbA/6cjvpv7zWZ0/s1600-h/background-position_27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S5toDeGBLtI/AAAAAAAAAbA/6cjvpv7zWZ0/s320/background-position_27.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Internet Explorer 6 and 7 position the background image with respect to the 
outer edge of the border instead of the outer edge of the padding. This is a bug.&lt;/p&gt;
&lt;p&gt;Length-valued &lt;code&gt;background-position&lt;/code&gt; declarations with the 
declaration &lt;code&gt;background-attachment:fixed&lt;/code&gt; cause the background image 
to be positioned with respect to the viewport. However, the background image is 
visible only in the border box of the element.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;background-position&lt;/code&gt; with percentage values&lt;/h5&gt;
&lt;p&gt;A &lt;code&gt;background-position&lt;/code&gt; declaration with percentage values 
specifies two points &amp;mdash; a point on the background image and a point in the 
paddding box with which the point on the background image is made to coincide.&lt;/p&gt;
&lt;p&gt;The first percentage sub-value determines the two horizontal coordinates &amp;mdash; 
one calculated with respect to the width of the background image which 
determines the horizontal coordinate of the point on the background image, and 
the other calculated with respect to the width of the padding box of the element 
in which the background image appears which determines the horizontal coordinate 
of the point in the padding box with which the point on the background image is 
made to coincide. &lt;br&gt;
The second percentage sub-value determines the two vertical coordinates &amp;mdash; 
one calculated with respect to the height of the background image which 
determines the vertical coordinate of the point on the background image, and the 
other calculated with respect to the height of the padding box of the element in 
which the background image appears which determines the vertical coordinate of 
the point in the padding box with which the point on the background image is 
made to coincide.&lt;br&gt;
The points are determined from the top left corner of the padding box and the 
top left corner of the background image&lt;/p&gt;
&lt;p&gt;In case of an element with &lt;code&gt;background-attachment:fixed&lt;/code&gt;, the 
offset is determined with respect to the top left corner of the image and the 
top left corner of the viewport.&lt;/p&gt;

&lt;p&gt;Example 28: &lt;code&gt;&amp;lt;div style=&amp;quot;width:600px&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin:5px;background-image:url(image3.png);background-position:10% 60%; 
background-repeat:no-repeat;background-color:transparent;color:yellow;padding:0&amp;quot;&amp;gt; 
the quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toFR2K03I/AAAAAAAAAbI/Brwb28gAam8/s1600-h/background-position_28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toFR2K03I/AAAAAAAAAbI/Brwb28gAam8/s320/background-position_28.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the image is 50px by 50px and the padding box&amp;#39;s width 
is 590px (because of the left and right 5px) and its height is 82px. The point on the image 
and the padding box can be found in this 
way:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;The value of the background-position declaration is &lt;code&gt;10% 60%&lt;/code&gt;&lt;/li&gt;
 &lt;li&gt;The horizontal sub-value is 10% and the vertical sub-value is 60%&lt;/li&gt;
 &lt;li&gt;The image&amp;#39;s width and height is 50px. 10% of 50px is 5px and 60% of 50px 
 is 30px. Therefore the point on the image is (5px,30px)&lt;/li&gt;
 &lt;li&gt;The width of the element&amp;#39;s padding box is 590px and the height is 82px. 
 10% of 590px is 59px and 60% of 82px is 49.2px. Therefore, the point on the 
 padding box is (59px, 49px) — 49.2px is rounded off to 49px &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point on the image is made to coincide with the point on the padding box. 
The horizontal and vertical distance of the top left corner of the image from 
the top and left outer edge of the padding box can be calculated by subtracting 
the background image&amp;#39;s point from the padding box&amp;#39;s point &amp;mdash; (59px, 49px) - 
(5px, 30px) = (54px, 19px). Therefore, the top left corner of the image will be 
located at a horizontal distance of&amp;nbsp; 54px from the outer edge of the left 
padding and a vertical distance of 19px from the outer edge of the top padding.
&lt;/p&gt;

&lt;p&gt;Below is an image showing different percentage values of &lt;code&gt;
background-position&lt;/code&gt; that have keyword equivalents:&lt;/p&gt;
&lt;p&gt;Example 29:&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toHk6tmMI/AAAAAAAAAbQ/v7W2VbtgJr8/s1600-h/background-position_29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toHk6tmMI/AAAAAAAAAbQ/v7W2VbtgJr8/s320/background-position_29.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Internet Explorer 6 and 7 position the background image with respect to the 
outer edge of the border instead of the outer edge the padding. This is a bug.&lt;/p&gt;
&lt;p&gt;Percentages greater than 100 are allowed. &amp;mdash; they cause the background 
image to be partially visible or to be not visible at all. When a background 
image is positioned such that a part of it is outside the padding box, it will 
be visible behind borders, but it will not be visible in the margins of the 
element.&lt;/p&gt;
&lt;p&gt;A value that is greater than 100% causes the padding box alignment point to 
be outside the padding box. It also causes the background image alignment point 
to be outside the image &amp;mdash; it is as if the image is larger than it really 
is. When the two alignment points coincide, the background image will be 
partially visible or not visible at all.&lt;/p&gt;
&lt;p&gt;Example 30: &lt;code&gt;&amp;lt;div style=&amp;quot;width:200px;&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;background-image:url(image3.png);background-repeat:no-repeat; 
background-position:0% 120%;margin:0;padding:0;border:dashed 35px skyblue&amp;quot;&amp;gt;the 
five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S5toJCvoI6I/AAAAAAAAAbY/tAKamG5_Pf0/s1600-h/background-position_30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S5toJCvoI6I/AAAAAAAAAbY/tAKamG5_Pf0/s320/background-position_30.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the height of the &amp;lt;p&amp;gt;&amp;#39;s padding box is 205px. The 
vertical sub-value of the &lt;code&gt;background-position&lt;/code&gt; declaration is 120%. 
Therefore the vertical coordinate of the padding box alignment point is 120% of 
205px, which is 246px. The horizontal coordinate is zero. Therefore, the padding 
box alignment point will be 246px - 205px = 41px below the outer edge of the 
padding. The size of the image is 50px by 50px. The vertical sub-value of 
the &lt;code&gt;background-position&lt;/code&gt; declaration is 120%. Therefore the vertical 
coordinate of the background image alignment point is 120% of 50px, which is 
60px. The horizontal coordinate is zero. Therefore the alignment point will be 
10px below the left edge of the background image. The image will therefore 
behave as if it is 60px tall. The vertical height of the image that is outside 
the padding box will be 41px - 10px = 31px and the part visible in the padding 
box is 50px - 31px = 19px.&lt;/p&gt;

&lt;p&gt;Internet Explorer 6 and 7 position the background image with respect to the 
outer edge of the border instead of the outer edge of the padding. This is a 
bug.&lt;/p&gt;
&lt;p&gt;Example 31: The picture below shows a background image of height and width 
50px positioned in a padding box of height and width 200px. The picture shows 
the positions of the background image for the declarations &lt;code&gt;
background-position:10% 20%&lt;/code&gt;, &lt;code&gt;background-position:90% 120%&lt;/code&gt; 
and &lt;code&gt;background-position:50% -20%&lt;/code&gt;.&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toPcO2ODI/AAAAAAAAAbg/grZhcy8ziys/s1600-h/background-position_31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S5toPcO2ODI/AAAAAAAAAbg/grZhcy8ziys/s320/background-position_31.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;The number of pixels that the background image is moved can be calculated by 
subtracting the horizontal and vertical positions of the background image from 
the corresponding positions of the padding box. For example, if the padding box 
is 100px by 75px and the background image is 50px by 25px, and the declaration 
is &lt;code&gt;background-position: 10% 10%&lt;/code&gt;, then the horizontal distance moved 
will be 10px - 5px = 5px and the vertical distance moved will be 7.5px - 2.5px = 
5px. The direction of movement depends on whether the background image is larger 
or smaller than the padding box.&lt;/p&gt;
&lt;p&gt;When the background image is smaller than the padding box, positive 
percentages less than 100 in a &lt;code&gt;background-position&lt;/code&gt; declaration cause the 
background image to move towards the right and the bottom. With positive 
percentages greater than 100, the bottom right of the background image may move 
out of the padding box. The greater the size difference between the image and 
the padding box, the greater is the chance that a part of the (or the entire) 
background image moves out of the padding box.With negative percentages, the background image moves 
towards the left and top.&lt;/p&gt;
&lt;p&gt;When the background image is the same size as the padding box, it cannot be 
moved with background-position.&lt;/p&gt;
&lt;p&gt;When the background image is larger than the padding box, positive 
percentages less than 100 in a &lt;code&gt;background-position&lt;/code&gt; declaration cause the 
background image to move towards the left and top. With negative percentages 
greater than 100, the top left of the background image may move out of the 
padding box. The greater the size difference between the image and the padding 
box, the greater the chance that a part of the (or the entire) background image 
moves out of the padding box. With negative percentages, the background images 
moves towards the bottom and right.&lt;/p&gt;

&lt;p&gt;Internet Explorer 8 and below ignore the decimal portion of percentage 
values. Therefore, in Internet Explorer 7 and below, &lt;code&gt;background-position: 
10.4% 25.9%&lt;/code&gt; is the same as &lt;code&gt;background-position: 10% 25%&lt;/code&gt;. 
This prevents precision positioning of the background image. To overcome this 
limitation, the background image should be only slightly smaller or slightly 
larger than its padding box.&lt;/p&gt;
&lt;p&gt;Percentage-valued &lt;code&gt;background-position&lt;/code&gt; declarations with the 
declaration &lt;code&gt;background-attachment:fixed&lt;/code&gt; cause the background image 
to be positioned with respect to the viewport. However, the background image is 
visible only in the border box of the element.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;background-position:inherit&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;background-position&lt;/code&gt; is not an inherited property. However, the
&lt;code&gt;background-position:inherit&lt;/code&gt; will cause an element to inherit its 
parent element&amp;#39;s &lt;code&gt;background-position&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and 7 ignore the &lt;code&gt;inherit&lt;/code&gt; value.&lt;/p&gt;
&lt;h4&gt;The &lt;code&gt;background&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;background&lt;/code&gt; is a shorthand property. That is, it allows specifying the values 
of &lt;code&gt;background-color&lt;/code&gt;, &lt;code&gt;background-image&lt;/code&gt;, &lt;code&gt;
background-repeat&lt;/code&gt;, &lt;code&gt;background-attachment&lt;/code&gt; and &lt;code&gt;
background-position&lt;/code&gt; in a single declaration.&lt;/p&gt;
&lt;p&gt;Example 32: &lt;code&gt;background: fixed url(image.gif) peachpuff 10% 10% 
no-repeat&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The order of the sub-values is not important. A &lt;code&gt;background&lt;/code&gt; 
declaration must have at least one sub-value. Those values that are not 
specified are given the default value by the browser. The defalut values of the 
properties of a &lt;code&gt;background&lt;/code&gt; declaration are the same as the initial 
values of each of the individual properties. They are: for &lt;code&gt;
background-color&lt;/code&gt;, &lt;code&gt;transparent&lt;/code&gt;; for &lt;code&gt;background-image&lt;/code&gt;, 
&lt;code&gt;none&lt;/code&gt;; for &lt;code&gt;background-repeat&lt;/code&gt;, &lt;code&gt;repeat&lt;/code&gt;; for
&lt;code&gt;background-attachment&lt;/code&gt;, &lt;code&gt;scroll&lt;/code&gt; and for &lt;code&gt;
background-position&lt;/code&gt;, &lt;code&gt;0% 0%&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example 33: &lt;code&gt;background: skyblue;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The above declaration is equivalent to &lt;code&gt;background: skyblue scroll none 
0% 0% repeat;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-8617074258880964911?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/8617074258880964911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=8617074258880964911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8617074258880964911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/8617074258880964911'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/03/background-properties.html' title='The Background Properties'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/S5tm6wEVvNI/AAAAAAAAAYQ/0HgPFQy1V8c/s72-c/background-color_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4290732955236353247</id><published>2010-02-18T20:12:00.000+05:30</published><updated>2010-02-18T20:12:16.389+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The height Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;height&lt;/code&gt; property is used to specify the height of the 
content-area of block-level elements, inline replaced elements and other elements to 
which the declarations &lt;code&gt;display:block&lt;/code&gt; or &lt;code&gt;display:inline-block&lt;/code&gt; 
have been applied.&lt;/p&gt;
&lt;p&gt;By default, the height of an element is just enough to accommodate all its 
descendant elements.&lt;/p&gt;
&lt;p&gt;Its initial value is &lt;code&gt;auto&lt;/code&gt;. It is not an inherited property. It 
can take length values, percentages and the keywords &lt;code&gt;auto&lt;/code&gt; and &lt;code&gt;
inherit&lt;/code&gt;. Percentage values refer to the height of the containing block 
element. Negative values are not allowed.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;height&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;In the example below the &lt;code&gt;height&lt;/code&gt; property is applied to a 
block-level element.&lt;/p&gt;

&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;height:500px&amp;quot;&amp;gt;the quick brown fox jumps over the 
lazy dog. the five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S31Q9XjBxNI/AAAAAAAAAX4/lA0blaTxMrU/s1600-h/height+testing+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S31Q9XjBxNI/AAAAAAAAAX4/lA0blaTxMrU/s320/height+testing+1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;height&lt;/code&gt; property cannot be applied to inline-level 
non-replaced elements. However, it can be applied to inline-level replaced 
elements such as &lt;code&gt;img&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the 
&amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot;&amp;gt;quick &amp;lt;img style=&amp;quot;height:100px&amp;quot; 
src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot;&amp;gt; lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S31Q-rTZLTI/AAAAAAAAAYA/6juLG9Oblas/s1600-h/height+testing+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S31Q-rTZLTI/AAAAAAAAAYA/6juLG9Oblas/s320/height+testing+2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the image is resized proportionally to 40 pixels by 100 
pixels. In Firefox 3, Firefox 3.5 and Internet Explorer 8, the image is 
anti-aliased. However, in Internet Explorer 6 and Internet Explorer 7 the image 
is not anti-aliased.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;height&lt;/code&gt; with percentage values&lt;/h4&gt;
&lt;p&gt;With the &lt;code&gt;height&lt;/code&gt; property, percentage values refer to the height 
of the containing element. If the parent element does not have it&amp;#39;s height 
declared with a length or percentage value, then the percentage height 
declaration of the child element is ignored. The reason for this is, since, by 
default, an element is just tall enough to contain its descendant elements, if 
the height of a descendant element was in turn dependent on the height of the 
parent element, it would be an infinite loop. &lt;/p&gt;

&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;div style=&amp;quot;height:400px;background-color:purple&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;height: 
75%&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the above example, the height of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; will be 75% of 
400px, which is 300px.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;div style=&amp;quot;height:400px;background-color:purple&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;height:75%&amp;quot;&amp;gt;the quick brown 
fox jumps over the lazy dog. the five boxing wizards jump 
quickly.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S31RBP7BIVI/AAAAAAAAAYI/AEPTfClokkI/s1600-h/height+testing+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S31RBP7BIVI/AAAAAAAAAYI/AEPTfClokkI/s320/height+testing+4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, since the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&amp;#39;s parent element does not 
have a percentage or &lt;code&gt;px&lt;/code&gt; height declaration, the height declaration 
on the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; has no effect. However, Internet Explorer 6 and Internet 
Explorer 7, due to a bug, render the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; with a height of 300px. 
This buggy behavior can be fixed by triggering Internet Explorer 6 and 7&amp;#39;s 
&lt;code&gt;hasLayout&lt;/code&gt; property on the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&amp;#39;s parent &lt;code&gt;div&lt;/code&gt;. 
One way of doing this is by using the Internet Explorer-only declaration &lt;code&gt;zoom:1&lt;/code&gt; on the 
&lt;code&gt;div&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;width&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;em&lt;/code&gt; values values refer to the font size of the element.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;height:7.15em&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five 
boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the height of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is 7.15*35px = 
250.25px&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;height:auto&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Since &lt;code&gt;auto&lt;/code&gt; is the initial value of &lt;code&gt;height&lt;/code&gt;, the 
&lt;code&gt;
height:auto&lt;/code&gt; declaration is only useful to override another height 
declaration that has been applied to an element.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;height:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;height&lt;/code&gt; is not an inherited property. However, the &lt;code&gt;
height:inherit&lt;/code&gt; declaration can be used in order that an element inherits 
the &lt;code&gt;height&lt;/code&gt; declaration of its parent.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;height:inherit&lt;/code&gt; 
declaration.&lt;/p&gt;
&lt;h4&gt;Concluding Notes&lt;/h4&gt;
&lt;p&gt;Unlike the &lt;code&gt;width&lt;/code&gt; property, with &lt;code&gt;height&lt;/code&gt;, 
percentage-value declarations are ignored if the parent element does not have a 
percentage or &lt;code&gt;px&lt;/code&gt; height declaration, even if an ancestor element 
does. &lt;/p&gt;
&lt;p&gt;In Firefox 3, Firefox 3.5, Internet Explorer 7 and Internet Explorer 8, when 
the height of the content area + padding + margins of an element is more than 
the specified height of its containing element, the element overflows out of the 
content area of the containing element. However, in Internet Explorer 6 the 
height of the containing element is increased to accommodate the height of the 
child element without overflowing. That is, Internet Explorer 6 treats the &lt;code&gt;
height&lt;/code&gt; declaration as the minimum height of an element. This is a bug.&lt;/p&gt;
&lt;p&gt;In Internet Explorer 7, when the content area of an element overflows its 
containing block, unlike other browsers, the element&amp;#39;s background image or color 
covers the elements that follow. This can be fixed by using the Internet 
Explorer-only declaration &lt;code&gt;zoom:1&lt;/code&gt; on the elements that follow the 
containing block.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;height:inherit&lt;/code&gt; 
declaration. Therefore, this declaration must be avoided.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 sometimes render elements in 
unexpected ways when using the &lt;code&gt;height&lt;/code&gt; property. This can often be 
fixed by using the Internet Explorer-only declaration &lt;code&gt;zoom:1&lt;/code&gt; on the 
containing element.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4290732955236353247?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4290732955236353247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4290732955236353247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4290732955236353247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4290732955236353247'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/height-property.html' title='The height Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/S31Q9XjBxNI/AAAAAAAAAX4/lA0blaTxMrU/s72-c/height+testing+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3985166931980018516</id><published>2010-02-18T20:07:00.000+05:30</published><updated>2010-02-18T20:07:08.358+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The width Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;width&lt;/code&gt; property is used to specify the width of the 
content-area of block-level elements, inline replaced elements and other elements to 
which the declarations &lt;code&gt;display:block&lt;/code&gt; or &lt;code&gt;display:inline-block&lt;/code&gt; 
have been applied.&lt;/p&gt;
&lt;p&gt;By default, the width of an element is dependant on the width of the viewport 
of the web browser window.&lt;/p&gt;
&lt;p&gt;Its initial value is &lt;code&gt;auto&lt;/code&gt;. It is not an inherited property. It 
can take length values, percentages and the keywords &lt;code&gt;auto&lt;/code&gt; and &lt;code&gt;
inherit&lt;/code&gt;. Percentage values refer to the width of the containing block 
element. Negative values are not allowed.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;width&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;In the example below the &lt;code&gt;width&lt;/code&gt; property is applied to a 
block-level element.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:300px&amp;quot;&amp;gt;the quick brown fox jumps over the 
lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S31QNcEISII/AAAAAAAAAXo/SVDX-DO9GOQ/s1600-h/width_testing_px_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S31QNcEISII/AAAAAAAAAXo/SVDX-DO9GOQ/s320/width_testing_px_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;width&lt;/code&gt; property cannot be applied to inline-level 
non-replaced elements. However, it can be applied to inline-level replaced 
elements such as &lt;code&gt;img&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot;&amp;gt;the &amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; 
  alt=&amp;quot;20x50.jpg&amp;quot;&amp;gt;quick &amp;lt;img style=&amp;quot;width:50px&amp;quot; 
  src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot;&amp;gt; lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S31QOvTLfQI/AAAAAAAAAXw/MlSPxqK0hUg/s1600-h/width_testing_px_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S31QOvTLfQI/AAAAAAAAAXw/MlSPxqK0hUg/s320/width_testing_px_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, note how the second image is scaled proportionally so 
that the width is 50px. In Firefox 3, Firefox 3.5 and Internet Explorer 8, the 
resized image is also anti-aliased. However, in Internet Explorer 6 and Internet 
Explorer 7, the image is not anti-aliased. &lt;/p&gt;
&lt;h4&gt;&lt;code&gt;width&lt;/code&gt; with percentage values&lt;/h4&gt;
&lt;p&gt;With the &lt;code&gt;width&lt;/code&gt; property, percentage values refer to the 
width of the containing element. All the displayed elements of a web page have 
the &lt;code&gt;body&lt;/code&gt; element as an ancestor. Therefore, if an element has no 
other parent, then percentage widths will refer to the width of the body 
element. The default width of the body element is equal to the width of the viewport 
excluding any padding and margins of the &lt;code&gt;html&lt;/code&gt; element.&lt;/p&gt;

&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;div style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:750px;background-color:purple&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;width: 75%&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the 
five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the width of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is 75% of the 
width of the parent element (750px). This computes to 562.5px, which rounds off 
to 563px.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;width&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;em&lt;/code&gt; values values refer to 
the font size of the element.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:14.29em&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five 
boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the width of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is 14.29*35px = 
500.15px&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;width:auto&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;Since &lt;code&gt;auto&lt;/code&gt; is the initial value of &lt;code&gt;width&lt;/code&gt;, the &lt;code&gt;width:auto&lt;/code&gt; 
declaration is only useful to override another width declaration that has been 
applied to an element.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;width:inherit&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;width&lt;/code&gt; is not an inherited property. However, the &lt;code&gt;
width:inherit&lt;/code&gt; declaration can be used in order that an element inherits 
the &lt;code&gt;width&lt;/code&gt; declaration of its parent.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;width:inherit&lt;/code&gt; 
declaration.&lt;/p&gt;
&lt;h4&gt;Concluding Notes&lt;/h4&gt;
&lt;p&gt;In Firefox 3, Firefox 3.5, Internet Explorer 7 and Internet Explorer 8, when 
the width of the content area + padding + margins of an element is more than the specified 
width of its containing element, the element overflows out of the content area 
of the containing element. However, in Internet Explorer 6 the width of the 
containing element is increased to accomodate the child element without 
overflowing. That is, Internet Explorer 6 treats the &lt;code&gt;width&lt;/code&gt; 
declaration as the minimum width of an element. This is a bug.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;width:inherit&lt;/code&gt; 
declaration. Therefore, this declaration must be avoided.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3985166931980018516?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3985166931980018516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3985166931980018516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3985166931980018516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3985166931980018516'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/width-property.html' title='The width Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__ZdUHId0XUA/S31QNcEISII/AAAAAAAAAXo/SVDX-DO9GOQ/s72-c/width_testing_px_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1867090806598398252</id><published>2010-02-18T18:02:00.001+05:30</published><updated>2010-02-18T20:13:58.641+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text properties'/><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The color Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;color&lt;/code&gt; property specifies the foreground color of an element. 
The foreground color applies to text. It also applies to borders when there is 
no border-color declaration.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;color&lt;/code&gt; property can take, as values, color keywords, system 
color keywords, 
hexadecimal color notation, decimal functional rgb notation, percentage 
functional rgb notation and the keyword &lt;code&gt;inherit&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;color&lt;/code&gt; with Color Keywords&lt;/h4&gt;



&lt;p&gt;For a list of color keywords, see &lt;a href="http://destination-code.blogspot.com/2008/09/css-values-colors.html"&gt;
Specifying Color in CSS&lt;/a&gt;. Below is an example that uses a CSS 
2.1 color keyword.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:aqua&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S30ysH6GC7I/AAAAAAAAAXQ/luuMguOwvbE/s1600-h/Color+Testing_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S30ysH6GC7I/AAAAAAAAAXQ/luuMguOwvbE/s320/Color+Testing_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Below is an example that uses a CSS 3 color keyword.&lt;/p&gt;

&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:crimson&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;



&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S30ytNTvyGI/AAAAAAAAAXY/FB654xYdicU/s1600-h/Color+Testing_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S30ytNTvyGI/AAAAAAAAAXY/FB654xYdicU/s320/Color+Testing_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;&lt;code&gt;color&lt;/code&gt; with System Color Keywords&lt;/h4&gt;
&lt;p&gt;To mimic the appearance of the viewer&amp;#39;s operating system&amp;#39;s GUI, the colors of 
text elements need to match the viewers OS. For this, &lt;dfn&gt;system color 
keywords&lt;/dfn&gt; can be used. see &lt;a href="http://destination-code.blogspot.com/2008/09/css-values-colors.html"&gt;
Specifying Color in CSS&lt;/a&gt; for more info. Below is an example.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:WindowText&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;color&lt;/code&gt; with Functional rgb Values&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;color&lt;/code&gt; property can have a value specifying a color in the 
decimal functional rgb notation.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:rgb(255,105,180)&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S30yuSf5BzI/AAAAAAAAAXg/zMpLPoE7tGs/s1600-h/Color+Testing_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S30yuSf5BzI/AAAAAAAAAXg/zMpLPoE7tGs/s320/Color+Testing_4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The color can also be specified in the percentage functional rgb notation.&lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:rgb(100%,49.8%,31.3%)&amp;quot;&amp;gt;coral the quick brown fox jumps over the 
lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the color value can also be expressed as &lt;code&gt;rgb(255, 
127,80)&lt;/code&gt;&lt;/p&gt;



&lt;h4&gt;&lt;code&gt;color&lt;/code&gt; with Hexadecimal Notation&lt;/h4&gt;
&lt;p&gt;The values of red, green and blue can be specified as hexadecimal numbers in 
a &lt;code&gt;color&lt;/code&gt; declaration. The value consists of a pound symbol (#) 
followed by the hexadecimal values of red, green and blue. There are no spaces.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:#FF7F50&amp;quot;&amp;gt;coral the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;In the above example, the color in decimal rgb notation is &lt;code&gt;
rgb(255,127,80)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A hexadecimal notation value can be shortened if the value of each primary 
color consists of a repeated number or letter.&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;color:#AD9&amp;quot;&amp;gt; the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the color value can be expanded to &lt;code&gt;#AADD99&lt;/code&gt; which 
is equivalent to &lt;code&gt;rgb(170,221,153)&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;color&lt;/code&gt; with &lt;code&gt;inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Since color is an inherited property, the only use of the &lt;code&gt;color:inherit&lt;/code&gt; 
declaration is to override another CSS color declaration on an element. Internet 
Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;color:inherit&lt;/code&gt; 
declaration.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1867090806598398252?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1867090806598398252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1867090806598398252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1867090806598398252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1867090806598398252'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/color-property.html' title='The color Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/S30ysH6GC7I/AAAAAAAAAXQ/luuMguOwvbE/s72-c/Color+Testing_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-5499024197959822512</id><published>2010-02-16T19:58:00.003+05:30</published><updated>2010-03-13T18:01:23.302+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Border Properties</title><content type='html'>&lt;p&gt;The &lt;dfn&gt;border&lt;/dfn&gt; of an element is one or more lines that surround the 
padding of an element. If there is no padding then the border surrounds the 
content area of the element. Borders are drawn over any background color or 
background image that the element has.&lt;/p&gt;
&lt;p&gt;CSS allows specifying the top, right, bottom and left borders of an element 
individually. The table below shows all the CSS border properties:&lt;/p&gt;
&lt;table class="table"&gt;
  &lt;col class="first_column"&gt;
  &lt;col span="3" class="appearance_column"&gt;
 &lt;tr&gt;
  &lt;td&gt;&lt;code style="font-size:larger;font-weight:bold"&gt;border&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #99FF33;font-size:larger"&gt;&lt;code&gt;border-width&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #99FF33;font-size:larger"&gt;&lt;code&gt;border-style&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #99FF33;font-size:larger"&gt;&lt;code&gt;border-color&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr class="row_style"&gt;
  &lt;td style=font-size:larger;background-color:#FF99FF;"&gt;&lt;code&gt;border-top&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-top-width&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-top-style&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-top-color&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr class="row_style"&gt;
  &lt;td style=font-size:larger;background-color:#FF99FF;"&gt;&lt;code&gt;border-right&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-right-width&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-right-style&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-right-color&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr class="row_style"&gt;
  &lt;td style=font-size:larger;background-color:#FF99FF;"&gt;&lt;code&gt;border-bottom&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-bottom-width&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-bottom-style&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-bottom-color&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr class="row_style"&gt;
  &lt;td style=font-size:larger;background-color:#FF99FF;"&gt;&lt;code&gt;border-left&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-left-width&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-left-style&lt;/code&gt;&lt;/td&gt;
  &lt;td style="background-color: #AED7FF;"&gt;&lt;code&gt;border-left-style&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;The &lt;code&gt;border&lt;/code&gt; property is the most general CSS border property. 
With this property, the &lt;code&gt;border-width&lt;/code&gt;, &lt;code&gt;border-style&lt;/code&gt; and
&lt;code&gt;border-color&lt;/code&gt; can be specified as space separated values. It can 
also take the single keyword &lt;code&gt;inherit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border:inset 9px lime&amp;quot;&amp;gt;the quick brown fox jumps 
over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qfASc7h8I/AAAAAAAAAUg/GaeXdBUCZhk/s1600-h/border+testing_border_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qfASc7h8I/AAAAAAAAAUg/GaeXdBUCZhk/s320/border+testing_border_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;border-width&lt;/code&gt; is 9px, the &lt;code&gt;
border-style&lt;/code&gt; is &lt;code&gt;inset&lt;/code&gt;, and the &lt;code&gt;border-color&lt;/code&gt; is
&lt;code&gt;lime&lt;/code&gt;. The order in which the values are specified is not important.&lt;/p&gt;
&lt;p&gt;The properties &lt;code&gt;border-width&lt;/code&gt;, &lt;code&gt;border-style&lt;/code&gt; and
&lt;code&gt;border-color&lt;/code&gt; specify a border&amp;#39;s width, the kind of border and the 
color of the border, respectively. When these properties have a single value, 
that value applies to all the four borders of an element. However, each of these 
properties can also have up to four space-separated values that allow specifying 
the properties of the top, right, bottom and left borders individually. When 
only two values are specified, the first value refers to the top and bottom 
borders and the second value refers to the right and left borders. When three 
values are specified, the first value refers to the top border, the second value 
to the right and left borders, and the third value refers to the bottom border.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-style:dashed dotted double 
groove&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five boxing wizards 
jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfDVTUtAI/AAAAAAAAAUo/LB_E5CqKRP0/s1600-h/border+testing_border-style_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfDVTUtAI/AAAAAAAAAUo/LB_E5CqKRP0/s320/border+testing_border-style_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The properties &lt;code&gt;border-top&lt;/code&gt;, &lt;code&gt;border-right&lt;/code&gt;, &lt;code&gt;
border-bottom&lt;/code&gt;, and &lt;code&gt;border-left&lt;/code&gt; specify the width, style and 
color of the border of each side of an element individually.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-top:dotted 8px blue&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfHIwrVxI/AAAAAAAAAUw/zeZBE8JSTcY/s1600-h/border+testing_border-top_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfHIwrVxI/AAAAAAAAAUw/zeZBE8JSTcY/s320/border+testing_border-top_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Percentage values are not allowed with any of the border properties. For 
specifying border width, em 
values are allowed and refer to the font size of the element that matches the 
CSS declaration. None of the border properties are inherited. The border 
properties can be applied to any element.&lt;/p&gt;
&lt;p&gt;The most specific border properties are &lt;code&gt;border-top-width&lt;/code&gt;, &lt;code&gt;border-right-width&lt;/code&gt;,&lt;code&gt; border-bottom-width&lt;/code&gt;, &lt;code&gt;border-left-width&lt;/code&gt;, 
&lt;code&gt;border-top-color&lt;/code&gt;, &lt;code&gt;border-right-color&lt;/code&gt;, 
&lt;code&gt;border-bottom-color&lt;/code&gt;, &lt;code&gt;border-left-style&lt;/code&gt;,&lt;/p&gt;
&lt;p&gt;The properties 
&lt;code&gt; border-top-style&lt;/code&gt;, &lt;code&gt;border-right-style&lt;/code&gt;, &lt;code&gt;border-bottom-style&lt;/code&gt;, 
and 
&lt;code&gt;border-left-style&lt;/code&gt;, can be used to apply a specific border style to 
a single side of an element. These properties have the initial value &lt;code&gt;none&lt;/code&gt;. 
Therefore, no borders appear on an element unless it has a border style 
declaration.&lt;/p&gt;
&lt;p&gt;Borders are drawn outside the content area of an element, surrounding the 
padding. However, any background image or background color of the element also 
appears under the border. In Internet Explorer 6 and Internet Explorer 7 when an 
element has &lt;code&gt;hasLayout&lt;/code&gt; the, background of the element is not 
rendered under the border. This is a bug.&lt;/p&gt;
&lt;h4&gt;The &lt;code&gt;border-width&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;border-width&lt;/code&gt; property can have, as values, the keywords
&lt;code&gt;thin&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;thick&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;, 
or length values. It can have up to four space-separated values, which allows 
setting the border width of each side of an element individually. There is no 
initial value. The width of individual borders can also be set using the 
properties &lt;code&gt;border-top-width&lt;/code&gt;, &lt;code&gt;border-right-width&lt;/code&gt;, &lt;code&gt;
border-bottom-width&lt;/code&gt; and &lt;code&gt;border-left-width&lt;/code&gt;. These properties 
have the initial value &lt;code&gt;medium&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-width:5px 2px 8px 
10px;border-color:blue&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five 
boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfJ3rO5XI/AAAAAAAAAU4/L1nvZo2oAUc/s1600-h/border+testing_border-width_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfJ3rO5XI/AAAAAAAAAU4/L1nvZo2oAUc/s320/border+testing_border-width_4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;border-width:thin&lt;/code&gt; results in a 1px border, &lt;code&gt;
border-width:medium&lt;/code&gt; results in a 3px border, &lt;code&gt;border-width:thick&lt;/code&gt; 
results in a 5px border. However in Internet Explorer 6 and Internet Explorer 7, 
the widths are 2px, 4px and 6px respectively.&lt;/p&gt;
&lt;p&gt;When an inline non-replaced element (such as a span) has top and bottom 
borders, the height of the content area of the parent element does not increase 
to accommodate large borders. Large top and bottom borders overflow the content 
area of the parent element. However, the left and right borders take up 
horizontal space on a line and therefore never overlap any characters (including 
spaces) that appear to the left or right of them.&lt;/p&gt;
&lt;p&gt;Large top borders on inline non-replaced elements may cover text that is 
vertically above it. Large bottom borders on inline non-replaced elements may be 
overlapped by text that is vertically below it. This can be seen in the example 
below.&lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot;&amp;gt;the five boxing wizards jump quickly. the quick brown 
&amp;lt;span style=&amp;quot;border-width:15px;border-style:solid;border-color:lime&amp;quot;&amp;gt;fox&amp;lt;/span&amp;gt; 
jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qfMKgs1jI/AAAAAAAAAVA/Ch_Rh-BniZ0/s1600-h/border+testing_border-width_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qfMKgs1jI/AAAAAAAAAVA/Ch_Rh-BniZ0/s320/border+testing_border-width_5.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When an inline replaced element (such as an image) has top a large top 
border, the content area of the containing block element expands to accommodate 
it. The edge of the bottom border will be on the baseline of the parent element. 
Just like on inline non-replaced elements, left and right borders take up 
horizontal space on a line and therefore never overlap any characters (including 
spaces) that appear to the left or right of them.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot;&amp;gt;the five boxing w&amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot; 
style=&amp;quot;border-width:15px;border-style:dashed;border-color:lime&amp;quot;&amp;gt;izards jump 
quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfOZwGTtI/AAAAAAAAAVI/KHen-lbtCec/s1600-h/border+testing_border-width_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfOZwGTtI/AAAAAAAAAVI/KHen-lbtCec/s320/border+testing_border-width_6.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When there is insufficient space for a border, it overflows the content area 
of the containing element. When a border overflows the viewport, the browsers 
inserts a horizontal scrollbar to view it. On elements with unmodified 
positioning, only bottom and right borders can overflow.&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;div 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;height:140px;width:300px;border-width:3px;border-style:dashed;border-color:aqua&amp;quot;&amp;gt; 
&amp;lt;p 
style=&amp;quot;height:135px;width:295px;border-width:3px;border-style:dashed;border-color:blue&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt; &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfSV1MU2I/AAAAAAAAAVQ/NAeiXg81ZbU/s1600-h/border+testing_border-width_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qfSV1MU2I/AAAAAAAAAVQ/NAeiXg81ZbU/s320/border+testing_border-width_7.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h5&gt;&lt;code&gt;border-top-width&lt;/code&gt;, &lt;code&gt;border-right-width&lt;/code&gt;, &lt;code&gt;
border-bottom-width&lt;/code&gt;, and &lt;code&gt;border-left-width&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;Using these properties, different border widths can be specified for each 
side of an element&amp;#39;s border.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-top-width:5px;border-right-width:2px;border-bottom-width:8px;border-left-width:10px;border-color:blue&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The same effect can also be obtained using the &lt;code&gt;border-width&lt;/code&gt; 
shorthand property with four space-separated values.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-width:5px 2px 8px 
10px;;border-color:blue&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;The &lt;code&gt;border-style&lt;/code&gt; Property&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;border-style&lt;/code&gt; property can have, as values, the keywords
&lt;code&gt;none&lt;/code&gt;, &lt;code&gt;hidden&lt;/code&gt;, &lt;code&gt;dotted&lt;/code&gt;, &lt;code&gt;dashed&lt;/code&gt;, &lt;code&gt;solid&lt;/code&gt;, &lt;code&gt;double&lt;/code&gt;, &lt;code&gt;groove&lt;/code&gt;, &lt;code&gt;ridge&lt;/code&gt;, &lt;code&gt;inset&lt;/code&gt;, &lt;code&gt;outset&lt;/code&gt;, 
and &lt;code&gt;inherit&lt;/code&gt;. There is no initial value. It can have upto four space-separated values, 
which allows setting the style of each side of an element individually. The 
style of individual borders can also be set using &lt;code&gt;border-top-style&lt;/code&gt;,
&lt;code&gt;border-right-style&lt;/code&gt;, &lt;code&gt;border-bottom-style&lt;/code&gt;, &lt;code&gt;
border-left-style&lt;/code&gt;. The initial value of these properties is &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;border-style:solid&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:solid&lt;/code&gt; creates a border that consists of a straight 
line that does not have any gaps or decoration.&lt;/p&gt;
&lt;p&gt;Example 8: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-style:solid&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;border-style:dashed&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:dashed&lt;/code&gt; creates a border consisting of a straight 
line with gaps at regular intervals.&lt;/p&gt;
&lt;p&gt;Example 9: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-style:dashed&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfXOhHn2I/AAAAAAAAAVY/G0dm6mFRkgo/s1600-h/border+testing_border-style_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfXOhHn2I/AAAAAAAAAVY/G0dm6mFRkgo/s320/border+testing_border-style_9.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;The above screenshot was taken in Firefox. In Internet Explorer (6, 7 and 8), 
the appearance of the border is slightly different &amp;mdash; the width of the gaps 
and the intervals at which they appear is different.&lt;/p&gt;
&lt;p&gt;The gap-width and gap-interval depends on the width of the border. In 
Firefox, the gap-width and the gap-interval is the three times the border-width. 
Therefore, in the above example, the gap-width and the gap-interval of the 
border is 15px. In Internet Explorer, the gap-width is equal to the width of the 
border and the gap-interval is twice the width of the border. Therefore, in the 
above example, the gap-width is 5px and the gap-interval is 10px.&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;border-style:dotted&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:dotted&lt;/code&gt; creates a dotted border. In Firefox, each 
dot is an anti-aliased square whose side is equal to the width declaration of 
the border. In Internet Explorer, each dot is approximately diamond shaped, 
without anti-aliasing and has a height and width is equal to the width 
declaration of the border. The space between the dots is equal to the width 
declaration of the border.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 renders a 1px dotted border like a 2px dashed border. 
This is a bug.&lt;/p&gt;
&lt;p&gt;Firefox puts a pointed angle at each corner of an element with a dotted 
border.&lt;/p&gt;
&lt;p&gt;Example 10: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-style:dotted&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfY_GoB-I/AAAAAAAAAVg/roIqlvQ6PtY/s1600-h/border+testing_border-style_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qfY_GoB-I/AAAAAAAAAVg/roIqlvQ6PtY/s320/border+testing_border-style_10.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h5&gt;&lt;code&gt;border-style:double&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:double&lt;/code&gt; creates two thin sub-borders separated by a 
gap. The sum of the widths of each sub-border and the gap in between is equal to 
the specified border width.&lt;/p&gt;
&lt;p&gt;In Firefox the two sub-borders are always of the same width. In Internet 
Explorer the width of the sub-borders may be different. The minimum border width 
necessary for a double border is 3px. In that case, the width of each sub-border 
and the in-between gap will be 1px.&lt;/p&gt;
&lt;p&gt;Example 11: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:7px;border-style:dotted;border-color:blue&amp;quot;&amp;gt;the quick brown 
fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qgAS5mpWI/AAAAAAAAAVw/9XjPn4VKmw8/s1600-h/border+testing_border-style_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qgAS5mpWI/AAAAAAAAAVw/9XjPn4VKmw8/s320/border+testing_border-style_11.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;

&lt;h5&gt;&lt;code&gt;border-style:groove&lt;/code&gt;&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;border-style:groove&lt;/code&gt; creates a border that has the appeareance of a groove. 
The browser achieves this by creating a kind of double border that has lines of two colors &amp;mdash; 
one in the same color as the foreground color or the color specified in the
&lt;code&gt;border-color&lt;/code&gt; declaration and the other line of a lighter shade. The 
inner and outer colors are flipped in each right angle.&lt;/p&gt;
&lt;p&gt;Notes: Internet Explorer 6 and Internet Explorer 7 do not render the groove 
border in the foreground color (when there is no &lt;code&gt;border-color&lt;/code&gt; 
declaration). This is a bug. The shades of the colors of&amp;nbsp; a groove border 
differs between Internet Explorer 8 and Firefox.&lt;/p&gt;
&lt;p&gt;The minimum width of a groove border is 2px. At 1px a groove border is 
rendered as a 1px solid line. &lt;/p&gt;
&lt;p&gt;Example 12: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:8px;border-style:groove&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgC7CLwbI/AAAAAAAAAV4/V2MPAl9L_lw/s1600-h/border+testing_border-style_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgC7CLwbI/AAAAAAAAAV4/V2MPAl9L_lw/s320/border+testing_border-style_12.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h5&gt;&lt;code&gt;border-style:ridge&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:ridge&lt;/code&gt; creates a border similar to a groove border, 
but with the colors of each right angle flipped. This is supposed to give the 
border the appearance of being raised.&lt;/p&gt;


&lt;h5&gt;&lt;code&gt;border-style:inset&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:inset&lt;/code&gt; creates a border that is supposed to give the 
box of the element the appeareance of being embedded in the page. Firefox 
creasts a border consisting of two colors &amp;mdash; one is the foreground color or 
in the color specified by the &lt;code&gt;border-color&lt;/code&gt; declaration and the 
other is a lighter shade. Internet Explorer 6, 7 and 8 create a border having 
four colors &amp;mdash; the top right angle consisting of two dark shades and the 
bottom right angle consisting of two lighter shades. The shades are darker in 
Internet Explorer 8 compared to Internet Explorer 6 and 7.&lt;/p&gt;
&lt;p&gt;Note: Internet Explorer 6 and Internet Explorer 7 do not render inset borders 
in the foreground color (when there is no &lt;code&gt;border-color&lt;/code&gt; 
declaration). This is a bug.&lt;/p&gt;
&lt;p&gt;Example 13: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:8px;border-style:inset&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgLN1QjyI/AAAAAAAAAWA/r3V0WMIjbM4/s1600-h/border+testing_border-style_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgLN1QjyI/AAAAAAAAAWA/r3V0WMIjbM4/s320/border+testing_border-style_13.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h5&gt;&lt;code&gt;border-style:outset&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-style:outset&lt;/code&gt; creates a border that is supposed to give 
the box of the element the appeareance of being raised on the page. Firefox 
creasts a border consisting of two colors &amp;mdash; one is the foreground color or 
in the color specified by the &lt;code&gt;border-color&lt;/code&gt; declaration and the 
other is a lighter shade. Internet Explorer 6, 7 and 8 create a border having 
four colors &amp;mdash; the bottom right angle consisting of two dark shades and the 
toop right angle consisting of two lighter shades. The shades are darker in 
Internet Explorer 8 compared to Internet Explorer 6 and 7.&lt;/p&gt;

&lt;p&gt;Note: Internet Explorer 6 and Internet Explorer 7 do not render outset 
borders in the foreground color (when there is no &lt;code&gt;border-color&lt;/code&gt; 
declaration). This is a bug.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;border-style:outset&lt;/code&gt; creates a border similar to &lt;code&gt;
border-style:inset&lt;/code&gt; but with the color of the right angles flipped.&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;border-style:hidden&lt;/code&gt; and &lt;code&gt;border-style:none&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;These declarations prevent the border from being rendered. No space is 
allocated to them either. In a table cell with &lt;code&gt;border-style:none&lt;/code&gt;, a 
border might still appear because of border declarations on adjoining cells. 
However, if a table cell has the declaration &lt;code&gt;border-style:hidden&lt;/code&gt;, 
then no borders are rendered on it, not even the borders of adjoining cells.&lt;/p&gt;
&lt;p&gt;Example 14: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:20px;border-style:none&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgOGjSOLI/AAAAAAAAAWI/fpDxylA7UaY/s1600-h/border+testing_border-style_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgOGjSOLI/AAAAAAAAAWI/fpDxylA7UaY/s320/border+testing_border-style_14.png" /&gt;&lt;/a&gt;&lt;/div&gt;



&lt;h5&gt;&lt;code&gt;border-style:inherit&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;border-style:inherit&lt;/code&gt; declaration causes an element to 
inherit its parent element&amp;#39;s border style. Internet Explorer 6 and Internet 
Explorer 7 ignore this declaration.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;border-top-style&lt;/code&gt;, &lt;code&gt;border-right-style&lt;/code&gt;, &lt;code&gt;
border-bottom-style&lt;/code&gt; and &lt;code&gt;border-left-style&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;Using these properties, different border styles can be specified for each 
side of an element&amp;#39;s border.&lt;/p&gt;
&lt;p&gt;Example 15: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-top-style:dashed; 
border-right-style:dotted;border-bottom-style:double;border-left-style:groove&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgQtzqbDI/AAAAAAAAAWQ/Wawv8FFYmeo/s1600-h/border+testing_border-style_15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgQtzqbDI/AAAAAAAAAWQ/Wawv8FFYmeo/s320/border+testing_border-style_15.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The same effect can also be achieved using a &lt;code&gt;border-style&lt;/code&gt; 
declaration with four values.&lt;/p&gt;
&lt;p&gt;Example 16: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-width:5px;border-style:dashed dotted 
double groove&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;The &lt;code&gt;border-color&lt;/code&gt; Property&lt;/h4&gt;



&lt;p&gt;&lt;code&gt;border-color&lt;/code&gt; specified the color of the border. When there is no
&lt;code&gt;border-color&lt;/code&gt; declaration, borders are rendered in the foreground 
color. If there is both a &lt;code&gt;border-color&lt;/code&gt; and a &lt;code&gt;color&lt;/code&gt; 
declaration, the border is rendered in the color specified by &lt;code&gt;border-color&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;border-color:transparent&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;border-color:transparent&lt;/code&gt; causes a border to be transparent. 
Therefore, the border occupies space but is not visible. Internet Explorer 6 
ignores this declaration. This is a bug.&lt;/p&gt;
&lt;p&gt;Example 17: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-width:20px;border-color:transparent&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;



&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgSo5-Z0I/AAAAAAAAAWY/WLcNWVlOyG4/s1600-h/border+testing_border-style_17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgSo5-Z0I/AAAAAAAAAWY/WLcNWVlOyG4/s320/border+testing_border-style_17.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h5&gt;&lt;code&gt;border-color:inherit&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;The &lt;code&gt;border-color:inherit&lt;/code&gt; causes an element&amp;#39;s border to inherit 
the border color of its parent element. Internet Explorer 6 and 7 ignore the
&lt;code&gt;border-color:inherit&lt;/code&gt; declaration. In Internet Explorer 8, the 
border color is only inherited if the parent element has a &lt;code&gt;border-color&lt;/code&gt; 
declaration.&lt;/p&gt;



&lt;h5&gt;&lt;code&gt;border-left-color&lt;/code&gt;, &lt;code&gt;border-top-color&lt;/code&gt;, &lt;code&gt;border-right-color&lt;/code&gt; 
and &lt;code&gt;border-bottom-color&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;Using these properties, colors of each border can be specified individually. 
When borders of two different colors meet at a corner, each border ends with a 
45 degree angle as shown in the figure below.&lt;/p&gt;
&lt;p&gt;Example 18: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-width:5px;border-top-color:aqua; 
border-right-color:fuchsia;border-bottom-color:green;border-left-color:blue&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgbIyAODI/AAAAAAAAAWg/S7FQP7Mn7t8/s1600-h/border+testing_border-style_18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qgbIyAODI/AAAAAAAAAWg/S7FQP7Mn7t8/s320/border+testing_border-style_18.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Individual border colors can also be specified using more than one value in 
the &lt;code&gt;border-color&lt;/code&gt; specification. An example is shown below.&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;border-style:solid;border-width:5px;border-top-color:aqua; 
border-right-color:fuchsia;border-bottom-color:green;border-left-color:blue&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Borders on Inline Non-replaced Elements&lt;/h4&gt;



&lt;p&gt;Borders can be applied to inline non-replaced elements such as spans. The 
right and left borders of an inline element take up horizontal space on the line and 
therefore elements on the left and right are moved by the borders. However, no 
extra vertical space is allocated to the top and bottom borders, this may cause 
them to overlap other elements. &lt;/p&gt;
&lt;p&gt;Example 19: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot;&amp;gt;the five boxing wizards jump quickly. the quick brown 
&amp;lt;span style=&amp;quot;border-width:15px;border-style:solid;border-color:lime&amp;quot;&amp;gt;fox&amp;lt;/span&amp;gt; 
jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgg56HMuI/AAAAAAAAAWo/wuhdYVEoZgg/s1600-h/border+testing_border-style_19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgg56HMuI/AAAAAAAAAWo/wuhdYVEoZgg/s320/border+testing_border-style_19.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;h4&gt;Borders on Inline Replaced Elements&lt;/h4&gt;
&lt;p&gt;Borders can be applied to inline replaced elements such as images. The 
behaviour of borders on inline replaced elements is different from non-replaced 
inline elements. Unlike non-replaced inline elements, space is allocated for all 
the borders of an inline replaced element.&lt;/p&gt;
&lt;p&gt;In the case of images, the bottom border is aligned to the baseline of the 
font.&lt;/p&gt;
&lt;p&gt;Example 20: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot;&amp;gt;the five boxing w&amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot; 
style=&amp;quot;border-width:15px;border-style:dashed;border-color:lime&amp;quot;&amp;gt;izards jump 
quickly&amp;lt;/p&amp;gt; &lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgnQMhKBI/AAAAAAAAAWw/Sps_v2JI1g8/s1600-h/border+testing_border-style_20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qgnQMhKBI/AAAAAAAAAWw/Sps_v2JI1g8/s320/border+testing_border-style_20.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h4&gt;The &lt;code&gt;border&lt;/code&gt; Property&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;border&lt;/code&gt; is a shorthand property. That is, it allows specifying 
the values of &lt;code&gt;border-width&lt;/code&gt;, &lt;code&gt;border-style&lt;/code&gt;, and &lt;code&gt;border-color&lt;/code&gt; in a 
single declaration. Each sub-property can have only one value. Therefore, the
&lt;code&gt;border&lt;/code&gt; declaration applies to all four sides of an element&amp;#39;s 
border. If, in a &lt;code&gt;border&lt;/code&gt; declaration, a particular sub-value is not 
specified, then the elemen&amp;#39;t borders get the initial value. Therfore, not 
specifying &lt;code&gt;border-style&lt;/code&gt; is the same as specifying the value &lt;code&gt;
none&lt;/code&gt;. Not specifying &lt;code&gt;border-width&lt;/code&gt; is the same as specifying 
the value &lt;code&gt;medium&lt;/code&gt;. Not specifying &lt;code&gt;border-color&lt;/code&gt; is the 
same as specifying the value of &lt;code&gt;color&lt;/code&gt; of that element.&lt;/p&gt;
&lt;p&gt;Example 21: &lt;code&gt;border: cornsilk 20px solid;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The order of the sub-values is not important. Therfore the above declaration 
is equivalent to &lt;code&gt;border: 20px solid cornsilk&lt;/code&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-5499024197959822512?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/5499024197959822512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=5499024197959822512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5499024197959822512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/5499024197959822512'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/border-properties.html' title='The Border Properties'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__ZdUHId0XUA/S3qfASc7h8I/AAAAAAAAAUg/GaeXdBUCZhk/s72-c/border+testing_border_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4857663265580383918</id><published>2010-02-16T19:00:00.001+05:30</published><updated>2010-02-17T14:36:46.818+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Padding Properties</title><content type='html'>&lt;p&gt;Padding is the spacing surrounding the edge of an element&amp;#39;s content area. If 
the element has a border, then padding comes between the inner edge of the 
border and the outer edge of the content area. An element&amp;#39;s background image or 
background color, will extend into the padding.&lt;/p&gt;
&lt;p&gt;Unlike margins, when the padding of two elements come into contact, they do 
not collapse.&lt;/p&gt;
&lt;p&gt;Padding can be applied to any element. It can accept length values, 
percentage values and the keyword &lt;code&gt;inherit&lt;/code&gt;. Percentage values refer 
to the width of the containing block. Unlike margins, padding cannot be 
negative.&lt;/p&gt;
&lt;p&gt;There are five padding properties: &lt;code&gt;padding&lt;/code&gt;, &lt;code&gt;padding-top&lt;/code&gt;,
&lt;code&gt;padding-right&lt;/code&gt;, &lt;code&gt;padding-bottom&lt;/code&gt; and &lt;code&gt;padding-left&lt;/code&gt;. 
The padding property can take up to four space separated values. With four 
values, the padding lengths specified are the top, right, bottom and left 
padding, in that order. With three values, the padding lengths specified are 
top, right and left together, and bottom, in that order. With two values, the 
padding lengths specified are top and bottom together and the right and left 
together. With one value, all the sides get the same padding.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;padding&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;Padding can be specified in &lt;code&gt;px&lt;/code&gt; as shown in the example below.&lt;/p&gt;


&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;padding:10px;&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the quick brown fox&amp;lt;/span&amp;gt; 
jumps over the lazy dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qaTopXLOI/AAAAAAAAAT4/PFgr1Sa1V2M/s1600-h/padding+testing_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qaTopXLOI/AAAAAAAAAT4/PFgr1Sa1V2M/s320/padding+testing_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;As can be seen in the example above, since is English is a left-to-right 
language, the space at the end of each sentence may be greater than the padding 
because when a word does not fit at the end of a line, the browser puts it in 
the next line. However, the space on the left, top and bottom always remains the 
same.&lt;/p&gt;
&lt;p&gt;When padding overflows an element, it behave the same as content area that 
has overflowed. Therefore, when padding overflows the viewport, the browser puts 
a horizontal scroll bar which enables it to be viewed.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;padding&lt;/code&gt; with percentage values&lt;/h4&gt;
&lt;p&gt;A &lt;code&gt;padding&lt;/code&gt; declaration with percentage values refers to the width 
of the containing block. Note that even top and bottom padding specified in 
percentages refer to the &lt;strong&gt;width&lt;/strong&gt; of the containing block.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;div 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;width:600px;border-width:5px;border-style:solid;padding:0;margin:0&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;padding:10%&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the five boxing 
wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qaWvHjGiI/AAAAAAAAAUA/DcHyivWUvoM/s1600-h/padding+testing_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qaWvHjGiI/AAAAAAAAAUA/DcHyivWUvoM/s320/padding+testing_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When an element has an inline element as its parent, percentage padding will 
depend not on the width of its parent (which is an inline element) but on the 
width of the ancestor block element.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;padding&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;


&lt;p&gt;A &lt;code&gt;padding&lt;/code&gt; declaration with em values refers to the font size of 
the element to which the &lt;code&gt;padding&lt;/code&gt; declaration applies.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size:20px;padding:2em&amp;quot;&amp;gt;the quick brown fox 
jumps over the lazy dog. the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qaYlLVHzI/AAAAAAAAAUI/_3eiCdf7h54/s1600-h/padding+testing_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qaYlLVHzI/AAAAAAAAAUI/_3eiCdf7h54/s320/padding+testing_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;Padding on Inline Non-Replaced Elements&lt;/h4&gt;
&lt;p&gt;Padding can be applied to inline non-replaced elements such as spans. Left 
and right padding on inline non-replaced elements is allocated horizontal space 
and therefore &amp;quot;pushes&amp;quot; adjacent content away. However, top and bottom padding on 
inline non-replaced elements is not allocated space and may therefore overlap 
content above and below an element.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot; &amp;gt;the quick brown fox j&amp;lt;span 
style=&amp;quot;padding:20px&amp;quot;&amp;gt;u&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;padding:10px&amp;quot;&amp;gt;m&amp;lt;/span&amp;gt;ps over the lazy 
dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qajuYDPCI/AAAAAAAAAUQ/FUAaX6qTaGU/s1600-h/padding+testing_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/S3qajuYDPCI/AAAAAAAAAUQ/FUAaX6qTaGU/s320/padding+testing_4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Note that left and right padding on a span (or other inline element) 
containing more than one line of text appears only at the beginning and end of 
the span (or inline element).&lt;/p&gt;
&lt;h4&gt;Padding on Inline Replaced Elements&lt;/h4&gt;
&lt;p&gt;Padding applied to inline replaced elements such as images behaves 
differently from padding on inline non-replaced elements. The main difference is 
that space is allocated to both top and bottom padding &lt;strong&gt;and&lt;/strong&gt; left 
and right padding. Also, the outer edge of bottom padding will be on the 
baseline of the element. &lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;&amp;quot; &amp;gt;the five boxing wizards jump quickly. the quick brown 
f&amp;lt;img src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50.jpg&amp;quot; 
style=&amp;quot;background-color:blue;padding:10px&amp;quot;&amp;gt;ox jumps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qauVUbHKI/AAAAAAAAAUY/zic5QqUjSds/s1600-h/padding+testing_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/S3qauVUbHKI/AAAAAAAAAUY/zic5QqUjSds/s320/padding+testing_5.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;Specifying padding on individual sides of an element&lt;/h4&gt;
&lt;p&gt;Padding can be specified individually on an element using the &lt;code&gt;
padding-top&lt;/code&gt;, &lt;code&gt;padding-right&lt;/code&gt;, &lt;code&gt;padding-bottom&lt;/code&gt; and
&lt;code&gt;padding-left&lt;/code&gt; properties and by putting multiple (upto 4) values on 
a &lt;code&gt;padding&lt;/code&gt; declaration.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;padding-top:10px;padding-right:20px;padding-bottom:30px;padding-left:40px&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. a b c d &amp;lt;span&amp;gt;the five boxing wizards 
jump quickly&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;The same effect can also be achieved using the shorthand &lt;code&gt;padding&lt;/code&gt; 
property with four values:&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;padding: 10px 20px 30px 40px&amp;quot;&amp;gt;the quick brown fox 
jumps over the lazy dog. a b c d &amp;lt;span&amp;gt;the five boxing wizards jump 
quickly&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4857663265580383918?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4857663265580383918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4857663265580383918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4857663265580383918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4857663265580383918'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/padding-properties.html' title='The Padding Properties'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/S3qaTopXLOI/AAAAAAAAAT4/PFgr1Sa1V2M/s72-c/padding+testing_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4298652484976638567</id><published>2010-02-16T18:38:00.001+05:30</published><updated>2010-02-17T14:30:53.736+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='box properties'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Margin Properties</title><content type='html'>&lt;p&gt;The margin is a blank area between elements in which only the background 
color or image of the parent element (or the nearest ancestor element that has a 
background color or image) is visible.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;margin&lt;/code&gt; property can take up to four length or percentage 
values, the keyword &lt;code&gt;auto&lt;/code&gt; repeated up to four times or the keyword
&lt;code&gt;inherit&lt;/code&gt; once. Multiple values are separated by spaces.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;margin:4px 8em auto 10px;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;margin:inherit;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When a &lt;code&gt;margin&lt;/code&gt; declaration has one value, all the four margins &amp;mdash; 
top, right, bottom and left, are set to that value.&lt;/p&gt;
&lt;p&gt;When a &lt;code&gt;margin&lt;/code&gt; declaration has four values, the first value 
refers to the top margin, the second refers to the right margin, the third 
refers to the bottom margin and the fourth refers to the left margin.&lt;/p&gt;
&lt;p&gt;When a &lt;code&gt;margin&lt;/code&gt; declaration has two values, the first value refers 
to the top and bottom margins and the second value refers to the right and left 
margins.&lt;/p&gt;
&lt;p&gt;When a &lt;code&gt;margin&lt;/code&gt; declaration has three values, the first value 
refers to the top margin, the second value refers to the right and left margins, 
and the third value refers to the bottom margin.&lt;/p&gt;
&lt;p&gt;Percentage values refer to the width of the containing block element. &lt;code&gt;
margin&lt;/code&gt; is not an inherited property. It does not have an initial value. 
The default margins of an element depends on browsers&amp;#39; internal stylesheets.&lt;/p&gt;
&lt;p&gt;Margin sizes can also be specified individually using the &lt;code&gt;margin-top&lt;/code&gt;,
&lt;code&gt;margin-right&lt;/code&gt;, &lt;code&gt;margin-bottom&lt;/code&gt; and &lt;code&gt;margin-left&lt;/code&gt; 
properties.&lt;/p&gt;
&lt;p&gt;Note: Margins of the &lt;code&gt;html&lt;/code&gt; element have the same background color 
or image as the &lt;code&gt;html&lt;/code&gt; element. Firefox 3.5, Internet Explorer 7 and 
Internet Explorer 8 do not render the bottom margin of the the &lt;code&gt;html&lt;/code&gt; 
element. Internet Explorer 6 does not render the borders and margins of the
&lt;code&gt;html&lt;/code&gt; element correctly. Internet Explorer 7 renders all margins of 
the &lt;code&gt;html&lt;/code&gt; element as solid margins.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;margin&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;In block-level element that does not have padding or borders, 
having a block-level child element, the height of the parent element will be 
just enough to contain the borders, padding and content area of the child 
element. Therefore, the top and bottom margins of the child element will spill 
out of the parent&amp;#39;s content area. This happens because the margin of the 
child element is in contact with the margin of the parent element. Therefore, 
the two margins collapse.&lt;br&gt;
However, if the child element&amp;#39;s top or bottom margin has the parent element&amp;#39;s 
padding or border adjacent to it, then the margin will be within the content 
area of the containing block. This is because the two margins are separated by 
the padding or border.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;div style=&amp;quot;margin:0;padding:0&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;margin:20px;padding:0&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qUZ3GATGI/AAAAAAAAATg/-0cH7LGsc6w/s1600-h/margin+testing_px_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qUZ3GATGI/AAAAAAAAATg/-0cH7LGsc6w/s320/margin+testing_px_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the top and bottom margins of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; are 
outside the content area &lt;code&gt;div&lt;/code&gt;. If the &lt;code&gt;div&lt;/code&gt; had top and 
bottom margins, then the top and bottom margins of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; would 
collapse with the top and bottom margins of the &lt;code&gt;div&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;div 
style=&amp;quot;margin:0;padding:0;border-style:solid;border-width:1px&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;margin:20px;padding:0&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qUizp8HfI/AAAAAAAAATo/bBYmUM6BSVI/s1600-h/margin+testing_px_border_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/S3qUizp8HfI/AAAAAAAAATo/bBYmUM6BSVI/s320/margin+testing_px_border_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Since the &lt;code&gt;div&lt;/code&gt; has a border, the top and bottom margins are 
within the content area of the &lt;code&gt;div&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;div style=&amp;quot;margin:0;padding:1px&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;margin:20px;padding:0&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qUlIyu4zI/AAAAAAAAATw/u732q6ENuQE/s1600-h/margin+testing_px_padding_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/S3qUlIyu4zI/AAAAAAAAATw/u732q6ENuQE/s320/margin+testing_px_padding_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Since the &lt;code&gt;div&lt;/code&gt; has a padding, the top and bottom margins are 
within the content area of the &lt;code&gt;div&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;Over-constrained Margins&lt;/h5&gt;
&lt;p&gt;Margins are said to be over-constrained when there is not enough space for 
them in the containing block.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;div 
style=&amp;quot;height:200px;border-width:10px;border-style:solid&amp;quot;&amp;gt;&amp;lt;p  
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;height: 200px;margin:20px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. 
the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, there is insufficient space for the top and bottom 
margins. In this situation, the browser renders the top margin within the 
containing &lt;code&gt;div&lt;/code&gt;, and, the content area of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; overflows out of the bottom of the &lt;code&gt;div&lt;/code&gt;. 
The bottom margin of&amp;nbsp; the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; has no effect on subsequent 
content. Subsequent 
elements are rendered on top of the overflowed parts of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;div 
style=&amp;quot;width:200px;border-width:10px;border-style:solid&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;width:200px;margin:20px&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, there is insufficient space for the left and right 
margins. In this situation, the browser renders the left margin within the 
containing &lt;code&gt;div&lt;/code&gt;, the content area of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and the 
right margin overflow out of the right of the &lt;code&gt;div&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;Left and Right Margins and Viewport Width&lt;/h5&gt;
&lt;p&gt;Example 8: &lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;width:700px;margin:50px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. the 
five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the above example, the width of the left and right margins are 50px each 
and the width of the content area of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is 700px. Therefore 
the minimum width of the viewport required to display the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and its 
margins is 800px. No matter what the width of the viewport, the left margin is 
always rendered. The right margin, however, behaves as if it has been set to
&lt;code&gt;auto&lt;/code&gt;. Therefore, if the viewport&amp;#39;s width is less than 750px, the 
browser will put a horizontal scroll bar so that both the left margin and the
&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&amp;#39;s content area can be viewed and the content area of the &lt;code&gt;
&amp;lt;p&amp;gt;&lt;/code&gt; will overflow the content area of its parent; there will be no right 
margin. If the viewport&amp;#39;s width is greater than 750px but less than 800px, then 
the left margin and content area will have the specified width, and the 
remaining space will be taken up by the right margin. If the viewport&amp;#39;s width is 
greater than 800px, the right margin&amp;#39;s width will be greater than 50px.&lt;/p&gt;
&lt;p&gt;Due to various bugs, the above example renders differently in Internet 
Explorer 6 &amp;mdash; like other browsers, the left margin is always 50px, but 
unlike other browsers, the right margin is always present and has a minimum 
width of 50px. If the viewport&amp;#39;s width is less than 800px, the browser puts a 
horizontal scroll bar. Also, the width of the &lt;code&gt;body&lt;/code&gt; element is 
automatically increased by the browser so that the margins and content area of 
the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; never overflow.&lt;/p&gt;

&lt;p&gt;Due to a rendering bug, Internet Explorer 7, like Internet Explorer 6, always 
renders the left and right margins along with the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&amp;#39;s content 
area. The difference is, it does not automatically increase the width of the 
containing element. Therefore, when the width of the viewport is less than 
800px, the right margin and, if necessary, the content area of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
overflow the &lt;code&gt;body&lt;/code&gt; element. The right margins is always 50px or 
more.&lt;/p&gt;
&lt;p&gt;Firefox 3, Firefox 3.5 and Internet Explorer 8 render the above example 
correctly.&lt;/p&gt;
&lt;h4&gt;Unconstrained Margins&lt;/h4&gt;
&lt;p&gt;When the sum of the widths of the left and right margins and the width of the 
content area is less than the width of the content area of the containing block, 
the right margin expands to take up the extra space available.&lt;/p&gt;
&lt;p&gt;When the sum of the heights of the top and bottom margins and the height of 
the content area is less than the height of the content area of the containing 
block, the bottom margin expands to take up the extra space available.&lt;/p&gt;
&lt;p&gt;Example 9: &lt;code&gt;&amp;lt;div 
style=&amp;quot;width:600px;height:400px;border-width:1px;border-style:solid&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;height:200px;margin:20px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog. 
the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the left and top margins are 20px while the right and 
bottom margins are 180px.&lt;/p&gt;
&lt;h4&gt;Vertical Collapsing of Margins&lt;/h4&gt;
&lt;p&gt;When the top or bottom margins of two elements come into contact with each 
other, the two margins vertically collapse. Therefore, the resulting 
margin will be the size of the larger margin. If the two margins are equal, 
then the margins will collapse to the size of a single margin.&lt;/p&gt;
&lt;p&gt;Example 10: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin:15px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;br&gt;
&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;margin:25px&amp;quot;&amp;gt;the quick 
brown fox jumps over the lazy dog.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Left and right margins never collapse &amp;mdash; a left and a right margin that 
are adjacent to each other remain the same size, therefore the total horizontal 
distance between the elements will be the sum of the margins.&lt;/p&gt;
&lt;p&gt;Example 11: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;&amp;quot;&amp;gt;the 
quick brown fox j&amp;lt;span style=&amp;quot;margin:20px&amp;quot;&amp;gt;u&amp;lt;/span&amp;gt;&amp;lt;span 
style=&amp;quot;margin:20px&amp;quot;&amp;gt;m&amp;lt;/span&amp;gt;ps over the lazy dog&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the distance between the &amp;quot;u&amp;quot; and the &amp;quot;m&amp;quot; will be 40px.&lt;/p&gt;
&lt;p&gt;Example 12: &lt;code&gt;&amp;lt;div 
style=&amp;quot;margin:10px;padding:0;background-color:purple&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;margin:20px;padding:0&amp;quot;&amp;gt;the 
quick brown fox jumps over the lazy dog. the five boxing wizards jump 
quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the top and bottom margins of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
(20px) collapse with the top and bottom margins of the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, resulting 
in a margin of 20px. This 
is because the top and bottom margins of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; are outside the
&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; since the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; has no top and bottom border or 
padding.&lt;/p&gt;
&lt;p&gt;When an element that has no padding or border has a child element that has 
top or bottom margins, the margins of the child element collapses with the 
margins of the parent element. However, if there is a border or padding 
separating two margins, then they do not collapse.&lt;/p&gt;
&lt;h4&gt;Negative Margins&lt;/h4&gt;
&lt;p&gt;When a &lt;code&gt;margin&lt;/code&gt; declaration has a negative value, and after 
collapsing the margin with adjacent margins the result is still negative, the 
content area of the element that the negative margin is applied to will be moved 
up or the content area of the next element will be moved up, or, the content 
area of the element will be stretched left or right depending on which margin 
has the negative value.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 do not correctly render negative 
margins that cause elements to overlap each other or overflow their containing 
elements. Some of Internet Explorer 7&amp;#39;s negative margin bugs can be fixed by 
triggering &lt;code&gt;hasLayout&lt;/code&gt; on the element that has the negative margins.&lt;/p&gt;
&lt;h5&gt;Negative top and bottom margins&lt;/h5&gt;
&lt;p&gt;When an element has a negative margin and the adjacent element has a margin 
that collapses on the negative margin, the resulting margin is the algebraic sum 
of the two margins.&lt;/p&gt;
&lt;p&gt;When an element has a negative top or bottom margin that, after collapsing 
with adjacent margins (if any) is still negative, the element is moved up (in 
the case of the top margin) or, the next element&amp;#39;s content area is moved up (in 
the case of the bottom margin).&lt;/p&gt;
&lt;p&gt;In Internet Explorer 6, the part of the top or bottom of an element&amp;#39;s content 
area that overflows the boundary of its containing block (which could be the 
edge of the containing block&amp;#39;s content area, the outer edge of the padding or 
the outer edge of the border), is cut-off or truncated. This bug cannot be fixed 
by triggering &lt;code&gt;hasLayout&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In Internet Explorer 7, when inside a &lt;code&gt;div&lt;/code&gt;, a part of the top or 
bottom of an element&amp;#39;s content area that is next to that element&amp;#39;s negative 
margin is cut-off or truncated. This bug occurs even when the padding of the 
element&amp;#39;s content area does not overflow its containing element. This bug can be 
fixed by triggering &lt;code&gt;hasLayout&lt;/code&gt; on the element that has the negative 
margin.&lt;/p&gt;
&lt;p&gt;Example 13: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin-bottom:-10px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy dog, the 
five boxing wizards jump quickly&amp;lt;/p&amp;gt; &amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times 
New Roman&amp;#39;;margin-left:10px;margin-top:0;&amp;quot;&amp;gt;the quick brown fox jumps over the 
lazy dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the first &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; has a negative bottom margin 
and the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; after it has a top margin set to 0. Therefore, the 
content area of the second &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is moved 10 pixels up. This brings 
the content area of the second &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; on top of the content area of 
the first &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;. The background image of the second &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
covers 10 pixels of the background of the first &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;. However, the 
text of the first &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is not covered.&lt;/p&gt;
&lt;p&gt;Note: Internet Explorer 6, due to a bug, does not render the background image 
of the second &amp;lt;p&amp;gt; correctly. In Internet Explorer 7, the background image of the 
second &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; covers the text of the first &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;. 
This bug cannot be fixed by triggering &lt;code&gt;hasLayout&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;Negative left and right margins&lt;/h5&gt;
&lt;p&gt;When an element has a negative margin and the adjacent element has a margin 
that collapses on the negative margin, the resulting margin is the algebraic sum 
of the two margins.&lt;/p&gt;
&lt;p&gt;When an element has a negative left or right margin that, after collapsing 
with adjacent margins (if any) is still negative, the element is extended to the 
left (in the case of the left margin) or, is extended to the right (in the case 
of the right margin). The extended portion to the left is outside the viewport 
cannot be viewed and the extended portion to the right can be viewed by 
horizontal scrolling.&lt;/p&gt;
&lt;p&gt;In Internet Explorer 6, the part of the left or right of an element&amp;#39;s content 
area that overflows the boundary of its containing block (which could be the 
edge of the containing block&amp;#39;s content area, the outer edge of the padding or 
the outer edge of the border), is cut-off or truncated. This bug cannot be fixed 
by triggering &lt;code&gt;hasLayout&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In Internet Explorer 7, when inside a &lt;code&gt;div&lt;/code&gt;, an element that has a 
negative right margin will have the portion of the content area that overflows 
the boundary of the containing element on the right truncated. The boundary of 
the containing element may be the right edge of the content area, the outer edge 
of the right padding or the outer edge of the right border. This bug can be 
fixed by triggering &lt;code&gt;hasLayout&lt;/code&gt; on the element that has the negative 
margin. However, this fix does not work if the containing element does not have 
padding or borders on the side of the negative margin of the child element.&lt;/p&gt;
&lt;p&gt;Example 13: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin-right:-50px;margin-left;-50px;padding:0&amp;quot;&amp;gt;the quick brown fox jumps 
over the lazy dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, since the left margin is -50px, 50px from the beginning 
of the &amp;lt;p&amp;gt; is cut off because it is supposed to be rendered outside the viewport. 
Note that the cut off portion cannot be viewed &amp;mdash; it is not possible to 
horizontally scroll to that region. The right margin is -50px, therefore, 50px 
of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; overflows the content area of is the containing 
element (&lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;). If the margin of the containing element is 
not large enought to contain the overflow, the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; overflows it. 
The browser puts a horizontal scroll bar which enables one to scroll to the part 
of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; that is outside the visible part of the viewport.&lt;/p&gt;

&lt;p&gt;Note: Internet Explorer 6 always expands the width of the containing element 
to accomodate the width of a child element. This is a bug. Internet Explorer 7, 
at certain window widths, renders the above example in the same way as Internet 
Explorer 6 (incorrectly) but at other widths renders it correctly.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;margin&lt;/code&gt; Declarations with &lt;code&gt;auto&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;The keyword &lt;code&gt;auto&lt;/code&gt; is useful only when applied to left and right 
margins. On top and bottom margins, &lt;code&gt;auto&lt;/code&gt; results in zero margins. 
However in Internet Explorer 6 and 7, due to a bug, &lt;code&gt;auto&lt;/code&gt; on top and 
bottom margins do not result in zero margins. Therefore, &lt;code&gt;auto&lt;/code&gt; on 
top and bottom margins must be avoided.&lt;/p&gt;
&lt;p&gt;When there is no left and right padding or borders on an element, the sum of the widths of the content 
area, the left margin, and the right margin will be equal to the width of the 
content area of the containing block.When left or right margins have the value
&lt;code&gt;auto&lt;/code&gt;, the browser determines the size of the margin, which will be 
such that the sum of the left and right margins and the content area is equal to 
the width of the content area of the containing block.&lt;/p&gt;
&lt;p&gt;On an element that has no left and right padding or borders, when the sum of 
the widths of the content area and the left and right margins does not equal to 
the sum of the content area of the containing block, the right margin is 
expanded to fill the available space. However, if the left margin is set to
&lt;code&gt;auto&lt;/code&gt;, then the left margin expands to fill the available space.&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;margin-right:auto&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;On an element whose width is auto, &lt;code&gt;margin-right:auto&lt;/code&gt; causes the 
element&amp;#39;s right margin to become zero.&lt;/p&gt;
&lt;p&gt;On an element that has its width set to a particular size and left margin set to 
zero or a particular size, &lt;code&gt;margin-right:auto&lt;/code&gt; causes the element&amp;#39;s 
right margin to expand to fill all the available space (after allocation of 
space to the content area and left margin). This is the default appearance of 
the right margin whether (when width and left-margin are of a particular size) 
or not there is a CSS declaration that matches the right margin.&lt;/p&gt;
&lt;p&gt;Example 14: &lt;code&gt;&amp;lt;div style=&amp;quot;height:400px;width:400px&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin-right:auto;width:200px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy 
dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;margin-left:auto&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;On an element whose width is auto, &lt;code&gt;margin-left:auto&lt;/code&gt; causes the 
element&amp;#39;s left margin to become zero.&lt;/p&gt;
&lt;p&gt;On an element that has its width to set a particular size and right margin set to 
zero or a particular size, &lt;code&gt;margin-left:auto&lt;/code&gt; causes the element&amp;#39;s 
right margin to expand to fill all the available space (after allocation of 
space to the content area and left margin).&lt;/p&gt;
&lt;p&gt;Example 15: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin-left:auto;width:200px&amp;quot;&amp;gt;the quick brown fox jumps over the lazy 
dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h5&gt;&lt;code&gt;margin-left:auto&lt;/code&gt; and &lt;code&gt;margin-right:auto&lt;/code&gt;&lt;/h5&gt;

&lt;p&gt;On an element whose width is auto, if both the left and right margins have 
the value &lt;code&gt;auto&lt;/code&gt;,&amp;nbsp; the 
element&amp;#39;s left and right margins become zero.&lt;/p&gt;
&lt;p&gt;On an element that has its width set to a particular size, having both left 
and right margins set to &lt;code&gt;auto&lt;/code&gt; causes the available space (after allocation of 
the content area space) to be split equally among the left and right margins. 
Therefore, the element&amp;#39;s content area will be horizontally centered in the 
containing block&amp;#39;s content area.&lt;/p&gt;
&lt;p&gt;Example 16: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;margin-left:auto;margin-right:auto;width:200px&amp;quot;&amp;gt;the quick brown fox jumps 
over the lazy dog, the five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;&lt;code&gt;margin-top:auto&lt;/code&gt; and &lt;code&gt;margin-bottom:auto&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;&lt;code&gt;margin-top:auto&lt;/code&gt; and &lt;code&gt;margin-bottom:auto&lt;/code&gt; causes the top 
and bottom margins of element to become zero. However, 
in Internet Explorer 6 and Internet Explorer 7 the margins are greater than zero. 
This is a bug. &lt;/p&gt;
&lt;p&gt;Note that if, after allocating the necessary vertical space to all the 
components of an element box there is still space left in the containing block, 
then the bottom margin expands and uses the remaining space, even if the element 
has the &lt;code&gt;margin-bottom:auto&lt;/code&gt; declaration.&lt;/p&gt;

&lt;h4&gt;Margin Declarations in Percentages&lt;/h4&gt;
&lt;p&gt;Percentages in margin declarations refer to the width of the containing block 
element. Internet Explorer 6 frequently calculates percentage margins 
incorrectly. Note that even top and bottom margins are calculated with respect 
to the width (not the height) of the containing block element.&lt;/p&gt;
&lt;h4&gt;Margin Declarations in &lt;code&gt;em&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Margin declarations in &lt;code&gt;em&lt;/code&gt; refer to the font size of the element 
to which the declaration applies.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4298652484976638567?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4298652484976638567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4298652484976638567' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4298652484976638567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4298652484976638567'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2010/02/margin-margin-top-margin-right-margin.html' title='The Margin Properties'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__ZdUHId0XUA/S3qUZ3GATGI/AAAAAAAAATg/-0cH7LGsc6w/s72-c/margin+testing_px_1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-2744037359489383204</id><published>2009-11-18T14:24:00.002+05:30</published><updated>2010-01-01T19:26:15.559+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The white-space Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;white-space&lt;/code&gt; property specifies with the way the browser 
should handle whitespace.&lt;/p&gt;
&lt;p&gt;The &lt;kbd&gt;space&lt;/kbd&gt; character, the &lt;kbd&gt;carriage return&lt;/kbd&gt;, the &lt;kbd&gt;line feed&lt;/kbd&gt; character and the 
&lt;kbd&gt;tab&lt;/kbd&gt; 
character are the whitespace characters that are affected by the &lt;code&gt;
white-space&lt;/code&gt; property. The following whitespace characters are &lt;strong&gt;not&lt;/strong&gt; 
affected by the &lt;code&gt;white-space&lt;/code&gt; property: non-breaking space (&lt;code&gt;&amp;amp;nbsp;&lt;/code&gt;), 
em space (&lt;code&gt;&amp;amp;emsp;&lt;/code&gt;), en space (&lt;code&gt;&amp;amp;ensp;&lt;/code&gt;) and thin space (&lt;code&gt;&amp;amp;thinsp;&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;white-space&lt;/code&gt; property can be applied to any element. It takes 
any one of the following values: &lt;code&gt;normal&lt;/code&gt;, &lt;code&gt;pre&lt;/code&gt;, &lt;code&gt;
nowrap&lt;/code&gt;, &lt;code&gt;pre-wrap&lt;/code&gt;, &lt;code&gt;pre-line&lt;/code&gt;, and &lt;code&gt;inherit&lt;/code&gt;. 
The inital value is &lt;code&gt;normal&lt;/code&gt;. &lt;code&gt;white-space&lt;/code&gt; is an 
inherited property.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;white-space:normal&lt;/code&gt;&lt;/h4&gt;


&lt;p&gt;This is the initial value of the property and therefore specifies the default 
whitespace handling of the browser.&lt;/p&gt;
&lt;p&gt;By default, the browser handles whitespace characters found within an element 
(whose contents are displayed as text) in this way:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Single or multiple &lt;kbd&gt;space&lt;/kbd&gt; characters are displayed as a 
 single space.&lt;/li&gt;
 &lt;li&gt;Single or multiple  
 &lt;kbd&gt;tab&lt;/kbd&gt; characters are displayed as a single 
 space.&lt;/li&gt;
 &lt;li&gt;Single or multiple &lt;kbd&gt;carriage return&lt;/kbd&gt; characters are displayed 
 as a single space.&lt;/li&gt;
 &lt;li&gt;Single or multiple &lt;kbd&gt;line feed&lt;/kbd&gt; 
 characters are displayed as a 
 single space.&lt;/li&gt;
 &lt;li&gt;Any combination of the above mentioned characters &amp;mdash; &lt;kbd&gt;space&lt;/kbd&gt;, 
 &lt;kbd&gt;tab&lt;/kbd&gt;, &lt;kbd&gt;carriage return&lt;/kbd&gt;, and &lt;kbd&gt;line feed,&lt;/kbd&gt; 
 are displayed as a single space.&lt;/li&gt;
 &lt;li&gt;The following whitespace character entities are displayed as many times 
 as they appear in the element: &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt;, &lt;code&gt;&amp;amp;emsp;&lt;/code&gt;,
 &lt;code&gt;&amp;amp;ensp;&lt;/code&gt; and &lt;code&gt;&amp;amp;thinsp;&lt;/code&gt;. That is, the browser does
 &lt;strong&gt;not&lt;/strong&gt; reduce multiple instances of these character entities into a 
 single space.&lt;/li&gt;
 &lt;li&gt;Spaces in the text that would appear at the end and at the 
 beginning of lines are &lt;strong&gt;not&lt;/strong&gt; displayed.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The &lt;code&gt;white-space:normal&lt;/code&gt; declaration is used to restore the 
default whitespace handling in an element when a different &lt;code&gt;white-space&lt;/code&gt; 
declaration was 
either specified or inherited.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;div style=&amp;quot;&lt;span style="white-space:pre-wrap"&gt;font-family:&amp;#39;Times 
New Roman&amp;#39;;font-size:35px;&lt;/span&gt;white-space:pre&amp;quot;&amp;gt;&lt;span style="white-space:pre-wrap"&gt;&amp;lt;p style=&amp;quot;white-space:normal&amp;quot;&amp;gt;the  five    boxing wizards       jump
quickly the quick&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/SwOz6T4dLSI/AAAAAAAAASs/N41cUnX9Lgw/s1600/white-space+testing_normal_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/SwOz6T4dLSI/AAAAAAAAASs/N41cUnX9Lgw/s320/white-space+testing_normal_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h4&gt;&lt;code&gt;white-space:pre&lt;/code&gt;&lt;/h4&gt;


&lt;p&gt;This declaration causes the browser to &amp;quot;preserve&amp;quot; the whitespace in an 
element and to prevent automatic line wrapping. That is, with this declaration, all the whitespace characters are 
displayed as many times as they appear in the element and only &lt;kbd&gt;carriage return&lt;/kbd&gt; 
characters, &lt;kbd&gt;line feed&lt;/kbd&gt; characters, &lt;kbd&gt;carriage return&lt;/kbd&gt; -
&lt;kbd&gt;line feed&lt;/kbd&gt; pairs and line break tags (&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;) cause the browser to start new lines.&lt;/p&gt;


&lt;p&gt;Note: In Firefox 3, Firefox 3.5, Safari 4, Chrome 3 and Opera 10, with &lt;code&gt;
white-space:pre&lt;/code&gt;, every line that is displayed ends with either a &lt;kbd&gt;
carriage return&lt;/kbd&gt; character, a&amp;nbsp; &lt;kbd&gt;line feed&lt;/kbd&gt; character or a
&lt;kbd&gt;carriage return&lt;/kbd&gt; - &lt;kbd&gt;line feed&lt;/kbd&gt; pair. However in Internet 
Explorer 6, Internet Explorer 7 and Internet Explorer 8, with &lt;code&gt;
white-space:pre&lt;/code&gt;, if the text in an element starts with a newline 
character or character sequence, the browser does not display the blank line. This is a bug.&lt;/p&gt;


&lt;p&gt;Example 2: &lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;&amp;lt;p style=&amp;quot;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;span style="white-space:pre-wrap"&gt;font-family:&amp;#39;Times 
New Roman&amp;#39;;font-size:35px;&lt;/span&gt;&lt;/code&gt;&lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;white-space:pre&amp;quot;&amp;gt;
the

 five        boxing

&amp;lt;span&amp;gt;wizards        jump&amp;lt;/span&amp;gt;

quickly&amp;lt;br&amp;gt; over

&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;


&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SwOz7ictEKI/AAAAAAAAAS0/pRtsPuOmsbg/s1600/white-space+testing_pre_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SwOz7ictEKI/AAAAAAAAAS0/pRtsPuOmsbg/s320/white-space+testing_pre_2.png" width="214" /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h4&gt;&lt;code&gt;white-space:nowrap&lt;/code&gt;&lt;/h4&gt;


&lt;p&gt;This declaration prevents the automatic wrapping of lines. However, line 
break tags (&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;) still create new lines. This declaration does not 
alter the way white space is handled.&lt;/p&gt;


&lt;p&gt;Example 3: &lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;&amp;lt;p style=&amp;quot;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;span style="white-space:pre-wrap"&gt;font-family:&amp;#39;Times 
New Roman&amp;#39;;font-size:35px;&lt;/span&gt;&lt;/code&gt;&lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;white-space:nowrap&amp;quot;&amp;gt;   the quick       brown   fox jumps over   the lazy dog the five boxing wizards jump&amp;lt;br&amp;gt; quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;


&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SwOz9D6xrpI/AAAAAAAAAS8/qF5i6g_U3yE/s1600/white-space+testing_nowrap_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SwOz9D6xrpI/AAAAAAAAAS8/qF5i6g_U3yE/s320/white-space+testing_nowrap_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h4&gt;&lt;code&gt;white-space:pre-wrap&lt;/code&gt;&lt;/h4&gt;


&lt;p&gt;This declaration causes the browser to &amp;quot;preserve&amp;quot; the whitespace in an 
element and, unlike &lt;code&gt;white-space:pre&lt;/code&gt;, does not prevent automatic 
line wrapping. That is, with this declaration, all the whitespace characters are 
displayed as many times as they appear in the element, the browser automatically 
wraps lines, and &lt;kbd&gt;carriage return&lt;/kbd&gt; 
characters, &lt;kbd&gt;line feed&lt;/kbd&gt; characters, &lt;kbd&gt;carriage return&lt;/kbd&gt; -
&lt;kbd&gt;line feed&lt;/kbd&gt; pairs and line break tags (&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;) cause the browser to start new lines.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;&amp;lt;p  
style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size:35px;&lt;/span&gt;&lt;/code&gt;&lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;white-space:pre-wrap&amp;quot;&amp;gt;the    quick brown fox  jumps over the lazy dog
the five boxing wizards jump&amp;lt;br&amp;gt; quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/span&gt;
&lt;/p&gt;


&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/SwOz-vdCApI/AAAAAAAAATE/8I-wLFQoTWY/s1600/white-space+testing_pre-wrap_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SwOz-vdCApI/AAAAAAAAATE/8I-wLFQoTWY/s320/white-space+testing_pre-wrap_4.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;Note: Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;white-space:pre-wrap&lt;/code&gt; declaration.&lt;/p&gt;


&lt;h4&gt;&lt;code&gt;white-space:pre-line&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;This declaration causes the browser to automatically wraps lines, and start 
new lines with &lt;kbd&gt;carriage return&lt;/kbd&gt; 
characters, &lt;kbd&gt;line feed&lt;/kbd&gt; characters, &lt;kbd&gt;carriage return&lt;/kbd&gt; -
&lt;kbd&gt;line feed&lt;/kbd&gt; pairs and line break tags (&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;). Unlike &lt;code&gt;white-space:pre&lt;/code&gt; 
however, &lt;kbd&gt;space&lt;/kbd&gt; characters and &lt;kbd&gt;tab&lt;/kbd&gt; characters are handled 
according to the browser&amp;#39;s default whitespace handling rules. &lt;/p&gt;
&lt;p&gt;Example 5: &lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;&amp;lt;p style=&amp;quot;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;span style="white-space:pre-wrap"&gt;font-family:&amp;#39;Times 
New Roman&amp;#39;;font-size:35px;&lt;/span&gt;&lt;/code&gt;&lt;span style="white-space:pre-wrap"&gt;&lt;code&gt;white-space:pre-line&amp;quot;&amp;gt;the    quick brown fox  jumps over the lazy dog
the five boxing wizards jump&amp;lt;br&amp;gt; quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;


&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SwO0CKH1U6I/AAAAAAAAATM/popBbPWDv5I/s1600/white-space+testing_pre-line_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SwO0CKH1U6I/AAAAAAAAATM/popBbPWDv5I/s320/white-space+testing_pre-line_5.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Note: Firefox 3, Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;
white-space:pre-line&lt;/code&gt; declaration.&lt;/p&gt;


&lt;h4&gt;&lt;code&gt;white-space&lt;/code&gt; inheritance&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;white-space&lt;/code&gt; is an inherited property, all descendants of an 
element inherit its &lt;code&gt;white-space&lt;/code&gt; declaration.&lt;/p&gt;


&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;div style=&amp;quot;white-space:pre&amp;quot;&amp;gt;&lt;span style="white-space:pre-wrap"&gt;&amp;lt;p 
style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size:35px&amp;quot;&amp;gt; the  five    boxing &amp;lt;span&amp;gt;wizards       jump
quickly&amp;lt;/span&amp;gt; the quick&amp;lt;/p&amp;gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;


&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/SwO0D5UDmKI/AAAAAAAAATU/h7LAaE9Pv4I/s1600/white-space+testing_inheritance_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/SwO0D5UDmKI/AAAAAAAAATU/h7LAaE9Pv4I/s320/white-space+testing_inheritance_6.png" /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h4&gt;&lt;code&gt;white-space:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;This declaration is used to override another &lt;code&gt;white-space&lt;/code&gt; 
declaration that is applied to an element and to restore the default behavior of 
inheriting the ancestor elements&amp;#39; &lt;code&gt;white-space&lt;/code&gt; declaration. &lt;/p&gt;


&lt;p&gt;Note: Internet Explorer 6 and Internet Explorer 7 ignore &lt;code&gt;
white-space:inherit&lt;/code&gt; declarations.&lt;/p&gt;
&lt;h4&gt;Concluding Notes&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;white-space:pre-wrap&lt;/code&gt; and &lt;code&gt;white-space:inherit&lt;/code&gt; must 
be avoided because Internet Explorer 6 and Internet Explorer 7 ignore these 
declarations.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;white-space:pre-line&lt;/code&gt; must be avoided because Firefox 3, Internet 
Explorer 6 and Internet Explorer 7 ignore it.&lt;/p&gt;
&lt;p&gt;If the text in an element that has the declaration &lt;code&gt;white-space:pre&lt;/code&gt;, 
starts with a newline character or character sequence, Internet Explorer 8 and 
below do not display the blank line. Therefore, elements that have &lt;code&gt;white-space:pre&lt;/code&gt; should 
not start with a newline character or character sequence.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-2744037359489383204?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/2744037359489383204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=2744037359489383204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/2744037359489383204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/2744037359489383204'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/white-space-property.html' title='The white-space Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__ZdUHId0XUA/SwOz6T4dLSI/AAAAAAAAASs/N41cUnX9Lgw/s72-c/white-space+testing_normal_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-4280103918837189291</id><published>2009-11-18T14:12:00.000+05:30</published><updated>2009-11-18T14:12:06.771+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The text-shadow Property</title><content type='html'>&lt;p&gt;This property specifies text shadows that appear with the text of an element.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;text-shadow&lt;/code&gt; property can be applied to any element. It is 
an inherited property (according to CSS 3). Its inital value is &lt;code&gt;none&lt;/code&gt;. Its syntax is 
as follows:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;text-shadow: &lt;span style="font-style:italic"&gt;color1&lt;/span&gt; &lt;span style="font-style:italic"&gt;horizontal_offset1&lt;/span&gt; &lt;span style="font-style:italic"&gt;vertical_offset1&lt;/span&gt; 
&lt;span style="font-style:italic"&gt;blur_radius1&lt;/span&gt;, &lt;span style="font-style:italic"&gt;color2&lt;/span&gt; &lt;span style="font-style:italic"&gt;horizontal_offset2&lt;/span&gt; &lt;span style="font-style:italic"&gt;vertical_offset2&lt;/span&gt; 
&lt;span style="font-style:italic"&gt;blur_radius&lt;/span&gt;&lt;/code&gt;&lt;span style="font-style:italic"&gt;2&lt;/span&gt;,...&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;color&lt;/code&gt; value specifies the color of the shadow. The &lt;code&gt;
horizontal offset&lt;/code&gt; is a length value that specifies the distance to the 
left or right of the text that the shadow has to be rendered. A positive value 
renders the shadow text to the right, a negative value renders it to the left. 
The &lt;code&gt;vertical offset&lt;/code&gt; is a length value that specifies the vertical distance from 
the text that the shadow has to be rendered. The &lt;code&gt;blur radius&lt;/code&gt;, a 
length value, controls 
the blurriness of the shadow.&lt;/p&gt;

&lt;p&gt;More than one shadow can be specified &amp;mdash; each set of values are 
separated by a comma.&lt;/p&gt;
&lt;p&gt;Note: text shadows have no effect on the size of the line box&lt;/p&gt;
&lt;p&gt;Example: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New 
Roman&amp;#39;;font-size:35px;text-shadow: green 15px 15px 
   0, gray -15px -15px 0&amp;quot;&amp;gt;the five boxing wizards&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/SwOy4MjoXlI/AAAAAAAAASk/IAFPs67FaU0/s1600/text-shadow_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SwOy4MjoXlI/AAAAAAAAASk/IAFPs67FaU0/s320/text-shadow_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the text has two shadows &amp;mdash; one below and the 
other above. Firefox 3 and Internet Explorer 8 and below ignore the &lt;code&gt;
text-shadow&lt;/code&gt; property. Firefox 3.5, Safari 4, Chrome 3 and Opera 10 
display the text shadows as shown in the picture.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;Since the &lt;code&gt;text-shadow&lt;/code&gt; property is ignored by Firefox 3 and 
Internet Explorer 8 and below, this property cannot be used.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-4280103918837189291?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/4280103918837189291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=4280103918837189291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4280103918837189291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/4280103918837189291'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/text-shadow-property.html' title='The text-shadow Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/SwOy4MjoXlI/AAAAAAAAASk/IAFPs67FaU0/s72-c/text-shadow_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3193470597471322257</id><published>2009-11-13T23:46:00.001+05:30</published><updated>2009-11-13T23:49:27.338+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The text-decoration Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; property produces the following text 
effects: underline, overline, line-through, and blink. &lt;/p&gt;
&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; property can be applied to any element. It 
is &lt;strong&gt;not&lt;/strong&gt; an inherited property. Its initial value is &lt;code&gt;none&lt;/code&gt;. The following keywords can be its values: &lt;code&gt;
underline&lt;/code&gt;, &lt;code&gt;overline&lt;/code&gt;, &lt;code&gt;line-through&lt;/code&gt;, &lt;code&gt;blink&lt;/code&gt;,
&lt;code&gt;none&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. The following keywords can be used 
together to combine their effects: &lt;code&gt;underline&lt;/code&gt;, &lt;code&gt;overline&lt;/code&gt;,
&lt;code&gt;line-through&lt;/code&gt;, and &lt;code&gt;blink&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; property does not affect the line-height of 
an element.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-decoration:underline&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration:underline&lt;/code&gt; declaration produces a line under 
the text (and any spaces) of an element. In Firefox 3, Firefox 3.5 and Internet Explorer 8, the 
thickness of the line depends on the font size of the element. In Internet 
Explorer 6 and Internet Explorer 7, the line is always one pixel thick. The line is drawn 
below the baseline.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, if &lt;code&gt;text-decoration:underline&lt;/code&gt; is 
applied to a &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; containing a &lt;code&gt;span&lt;/code&gt;, the underline is  
covered by the &lt;code&gt;span&lt;/code&gt;&amp;#39;s background color or background image. 
However, if the span does not have a &lt;code&gt;background-color&lt;/code&gt; or &lt;code&gt;
background-image&lt;/code&gt; specified, then the underline is visible. In Internet Explorer however, the 
underline is visible even when the span has a background color or image.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, underlines are drawn below images too. However, 
in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8, underlines 
are not drawn below images.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New 
Roman&amp;#39;;font-size:35px;text-decoration:underline&amp;quot;&amp;gt;the five boxing wizards 
@&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/Sv2henf_arI/AAAAAAAAASE/Si5xYm7_FuM/s1600-h/text-decoration_testing_underline_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/Sv2henf_arI/AAAAAAAAASE/Si5xYm7_FuM/s320/text-decoration_testing_underline_1.png" /&gt;&lt;/a&gt;&lt;&lt;/div&gt;
&lt;p&gt;In the above example, the underline is 2px thick and at a height of 2px from 
the bottom of the content area. In Internet Explorer 6 and Internet Explorer 7, 
the underline is 1px thick and 3px from the bottom of the content area.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-decoration:overline&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration:overline&lt;/code&gt; declaration produces a line above the text 
(and any space characters) of an element. In Firefox 3, Firefox 3.5 and Internet Explorer 8, the 
thickness of the line depends on the font size of the element. In Internet 
Explorer 6 and Internet Explorer 7, the line is always one pixel thick. The line is drawn 
at the top of the content area.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, if &lt;code&gt;text-decoration:overline&lt;/code&gt; is 
applied to a &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; containing a &lt;code&gt;span&lt;/code&gt;, the overline is 
covered by the &lt;code&gt;span&lt;/code&gt;&amp;#39;s background color or background image. 
However, if the span does not have a background color or background image 
specified, then the overline is visible. In Internet Explorer however, the 
overline is visible even when the span has a background color or image. &lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, overlines are drawn above images too. However, 
in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8, overlines 
are not drawn above images. In Firefox 3 and Firefox 3.5, tall images may cover 
an overline.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New 
Roman&amp;#39;;font-size:35px;text-decoration:overline&amp;quot;&amp;gt;the five boxing wizards 
@&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/Sv2hhkq2gtI/AAAAAAAAASM/SovjHc-cois/s1600-h/text-decoration_testing_overline_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/Sv2hhkq2gtI/AAAAAAAAASM/SovjHc-cois/s320/text-decoration_testing_overline_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the overline is 2px thick and is at the top of the 
content area. In Internet Explorer 6 and 7, the overline is 1px thick.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-decoration:line-through&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration:line-through&lt;/code&gt; declaration produces a line through 
the middle of the text in an element. In Firefox 3, Firefox 3.5, Internet 
Explorer 6, Internet Explorer 7 and Internet Explorer 8, the thickness of the 
line depends on the font size of the element. However, these browsers don&amp;#39;t 
all draw a line of the same thickness for a give font size.&lt;/p&gt;

&lt;p&gt;In Firefox 3 and Firefox 3.5, unlike for &lt;code&gt;underline&lt;/code&gt; and &lt;code&gt;
overline&lt;/code&gt;, with &lt;code&gt;line-through&lt;/code&gt;, the line is visible even 
through spans that have a background color or background image specified. In Internet Explorer 6, 
Internet Explorer 7 and in Internet Explorer 8, just like for &lt;code&gt;underline&lt;/code&gt; 
and &lt;code&gt;overline&lt;/code&gt;, the line is visible in spans that have a background 
color or image.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, unlike for &lt;code&gt;underline&lt;/code&gt; 
and &lt;code&gt;overline&lt;/code&gt;, with &lt;code&gt;line-through&lt;/code&gt;, the line is drawn 
over images. However, in Internet Explorer 6, Internet Explorer 7 and Internet 
Explorer 8, the line is not drawn through images.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New 
Roman&amp;#39;;font-size:35px;text-decoration:line-through&amp;quot;&amp;gt;the five boxing wizards @&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/Sv2hjpmP2iI/AAAAAAAAASU/IQ75F3_MYkw/s1600-h/text-decoration_testing_line-through_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/Sv2hjpmP2iI/AAAAAAAAASU/IQ75F3_MYkw/s320/text-decoration_testing_line-through_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the line is 2px thick and at a height of 15px in 
Firefox 3, Firefox 3.5 and Internet Explorer 8. In Internet Explorer 6 and 
Internet Explorer 7, the line is 4px thick and at a height of 15px.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-decoration:blink&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration:overline&lt;/code&gt; declaration causes the text of the 
element to blink. Firefox 3 and Firefox 3.5 support the blink feature, but not 
Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, only text blinks, not images.&lt;/p&gt;
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;text-decoration:blink&amp;quot;&amp;gt;the five boxing wizards 
@&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-decoration&lt;/code&gt; and descendant elements&lt;/h4&gt;
&lt;p&gt;According to the w3.org CSS specification, &lt;code&gt;text-decoration&lt;/code&gt; is not an inherited property. 
However, &lt;code&gt;text-decoration&lt;/code&gt; overlines, underlines and line-throughs that are applied to an inline-level or block-level 
elements also appear over descendant elements.&lt;/p&gt;
&lt;p&gt;The color of the text-decoration line depends on the value of the &lt;code&gt;color&lt;/code&gt; 
property of the element that the &lt;code&gt;text-decoration&lt;/code&gt; declaration was directly 
applied to, and the line remains the same color in descendant elements.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5, the thickness of the &lt;code&gt;text-decoration&lt;/code&gt; line depends on 
the font size of the element that the &lt;code&gt;text-decoration&lt;/code&gt; declaration was applied 
to. However, in Internet Explorer 8 thickness of the &lt;code&gt;text-decoration&lt;/code&gt; 
underline and overline depends on the 
font-size of the tallest em box on the line in which the &lt;code&gt;text-decoration&lt;/code&gt; 
line appears. However, the thickness of the line-through depends on the 
font-size of the text in which the line-through appears. In Internet Explorer 6 
and Internet Explorer 7, the &lt;code&gt;text-decoration&lt;/code&gt; underline and overline 
is always 1px thick, but the thickness of the line-through depends on the font 
size of the text in which the line-through appears.&lt;/p&gt;
&lt;p&gt;In Firefox 3 and Firefox 3.5 the position of the &lt;code&gt;text-decoration&lt;/code&gt; 
line is dependent on the font size of the element that the text-decoration 
declaration was applied to. In Internet Explorer 8 and below, the position of 
the &lt;code&gt;text-decoration&lt;/code&gt; line is dependent on the tallest em box in the 
element.&lt;/p&gt;
&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New 
Roman&amp;#39;;font-size:55px;color:black;text-decoration: line-through&amp;quot;&amp;gt;&amp;lt;span 
style=&amp;quot;font-size:25px;color:red&amp;quot;&amp;gt;the five boxing wizards jump &amp;lt;/span&amp;gt;&amp;lt;span 
style=&amp;quot;font-size:35px&amp;quot;&amp;gt;quickly&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/Sv2hlgqAVAI/AAAAAAAAASc/zyFI10W9MLg/s1600-h/text-decoration_testing_descendant_line-through_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/Sv2hlgqAVAI/AAAAAAAAASc/zyFI10W9MLg/s320/text-decoration_testing_descendant_line-through_4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The picture above shows how the example code is rendered in Firefox 3 and 
Firefox 3.5. In those browsers, the line-through is at a height appropriate for 
55px text even though the element does not contain a single glyph that is of 
55px. The color of the line is black because the value of the &lt;code&gt;color&lt;/code&gt; 
property for the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is black. The thickness of the line-through is 
based upon the font size of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;. In Internet Explorer 6 and 
Internet Explorer 7, and Internet Explorer 8 there are two separate 
line-throughs, one for each span and of different thickness, based on the font 
size of each span. The color of the line-through is black, based on the color 
declaration on the &lt;code&gt;
&amp;lt;p&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;text-decoration:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration:inherit&lt;/code&gt; declaration prevents the parent 
element&amp;#39;s &lt;code&gt;text-decoration&lt;/code&gt; declaration from having any effect on an 
element and causes the element to inherit the parent element&amp;#39;s &lt;code&gt;
text-decoration&lt;/code&gt; declaration as its own.&lt;/p&gt;

&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 ignore the &lt;code&gt;text-decoration:inherit&lt;/code&gt; declaration.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;text-decoration:none&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The initial value of &lt;code&gt;text-decoration&lt;/code&gt; is &lt;code&gt;none&lt;/code&gt;. 
Therefore, the declaration &lt;code&gt;text-decoration:none&lt;/code&gt; is useful in 
overriding another &lt;code&gt;text-decoration&lt;/code&gt; declaration that has been 
applied to an element.&lt;/p&gt;
&lt;h4&gt;Multiple &lt;code&gt;text-decoration&lt;/code&gt; values in a declaration&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; property can have more than one of the 
following values: &lt;code&gt;underline&lt;/code&gt;, &lt;code&gt;overline&lt;/code&gt;, &lt;code&gt;
line-through&lt;/code&gt;, and &lt;code&gt;blink&lt;/code&gt;. Each value is separated from the 
next by a space. When the property has more than one value, the effect of each 
value is combined.&lt;/p&gt;
&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;text-decoration:underline overline &amp;quot;&amp;gt;the five boxing wizards 
@&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the above example, the text of the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; will have both an 
underline and overline.&lt;/p&gt;
&lt;h4&gt;Concluding Notes&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; property should be used with caution on 
elements that have descendants. This is because the text decoration that was 
specified on the parent also appears in the descendants. In such a situation, 
there is no way to remove the text decoration from the descendant elements.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;text-decoration&lt;/code&gt; declaration should not be used on elements 
on that contain images because of differences in rendering between Firefox and 
Internet Explorer 8 and below.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;text-decoration:blink&lt;/code&gt; is not supported in Internet Explorer 8 
and below.&lt;/p&gt;
&lt;p&gt;For consistent rendering in all browsers, one should avoid using &lt;code&gt;text-decoration&lt;/code&gt; on an element that 
contains text of different font-sizes.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3193470597471322257?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3193470597471322257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3193470597471322257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3193470597471322257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3193470597471322257'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/text-decoration-property.html' title='The text-decoration Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__ZdUHId0XUA/Sv2henf_arI/AAAAAAAAASE/Si5xYm7_FuM/s72-c/text-decoration_testing_underline_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-580511367788620613</id><published>2009-11-11T20:41:00.000+05:30</published><updated>2009-11-11T20:41:25.591+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The text-transform Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;text-transform&lt;/code&gt; property affects the capitalization or the 
case of the letters in an element. This property can transform all the letters 
in an element into capitals or into lowercase letters, or it can capitalize the 
first letter of every word.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;text-transform&lt;/code&gt; property can be applied to any element. Its 
values can be any one of these: &lt;code&gt;uppercase&lt;/code&gt;, &lt;code&gt;lowercase&lt;/code&gt;,
&lt;code&gt;capitalize&lt;/code&gt;, &lt;code&gt;none&lt;/code&gt;, or &lt;code&gt;inherit&lt;/code&gt;. The initial 
value is &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-transform:uppercase&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-transform:uppercase&lt;/code&gt; declaration transforms all the 
letters in an element (and its descendants) to uppercase.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;text-transform:uppercase&amp;quot;&amp;gt;the quick brown fox 123&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SvrSyycb5lI/AAAAAAAAARk/QBIGXTtWu2E/s1600-h/text-transform+testing_uppercase+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SvrSyycb5lI/AAAAAAAAARk/QBIGXTtWu2E/s320/text-transform+testing_uppercase+1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, though all the letters in the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; are 
lowercase, the &lt;code&gt;text-transform:uppercase&lt;/code&gt; declaration transforms all 
the letters to uppercase.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-transform:lowercase&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-transform:uppercase&lt;/code&gt; declaration transforms all the 
letters in an element (and its descendants) to lowercase.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;text-transform:lowercase&amp;quot;&amp;gt;The QuicK brown FOX 123&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/SvrS1Zt8glI/AAAAAAAAARs/zE1Ji56Nz3U/s1600-h/text-transform+testing_lowercase+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SvrS1Zt8glI/AAAAAAAAARs/zE1Ji56Nz3U/s320/text-transform+testing_lowercase+2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, though all the letters in the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; are a 
mix of lowercase and uppercase, the &lt;code&gt;text-transform:lowercase&lt;/code&gt; declaration 
transforms all the letters to lowercase.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-transform:capitalize&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-transform:capitalize&lt;/code&gt; declaration transforms the first 
letters of all the words in an element (and its descendants) to uppercase, that 
is, it capitalizes all the words.&lt;/p&gt;
&lt;p&gt;Note: In Firefox 3 and Firefox 3.5 only the first letter of a hyphenated word 
is capitalized. However, in Internet Explorer 6, Internet Explorer 7 and 
Internet Explorer 8, the first letter and the letter after the hyphen are 
capitalized.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;text-transform:capitalize&amp;quot;&amp;gt;the quick-brown fox jumps over&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvrS2y45lgI/AAAAAAAAAR0/iYKsHq4zH4s/s1600-h/text-transform+testing_capitalize+3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvrS2y45lgI/AAAAAAAAAR0/iYKsHq4zH4s/s320/text-transform+testing_capitalize+3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the first letter of each word is capitalized.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-transform:none&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-transform:none&lt;/code&gt; declaration restores the default browser 
behavior of displaying letters in the same case as they are in the element. This 
declaration is useful to override another inherited &lt;code&gt;text-transform&lt;/code&gt; 
declaration on an element.&amp;nbsp; &lt;/p&gt;

&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;div style=&amp;quot;text-transform:uppercase&amp;quot;&amp;gt;&amp;lt;p 
style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;text-transform:none&amp;quot;&amp;gt;The 
Quick Brown Fox Jumps&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/__ZdUHId0XUA/SvrS48DWYII/AAAAAAAAAR8/d1aKLaJiL0w/s1600-h/text-transform+testing_none+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SvrS48DWYII/AAAAAAAAAR8/d1aKLaJiL0w/s320/text-transform+testing_none+4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;text-transform:none&lt;/code&gt; declaration 
overrides the inherited &lt;code&gt;text-transform:uppercase&lt;/code&gt; declaration 
inherited from the &lt;code&gt;div&lt;/code&gt;. Therefore, the text in the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; 
is not transformed to uppercase.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;text-transform:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-transform:inherit&lt;/code&gt; is used to override another &lt;code&gt;
text-transform&lt;/code&gt; declaration that has been applied to an element, and to 
restore the default behavior of inheriting the parent element&amp;#39;s &lt;code&gt;
text-transform&lt;/code&gt; declaration.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 do not support &lt;code&gt;
text-transform:inherit&lt;/code&gt;, they ignore the declaration.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-transform:inherit&lt;/code&gt; declaration should be avoided because 
Internet Explorer 6 and Internet Explorer 7 ignore it.&lt;/p&gt;
&lt;p&gt;With the &lt;code&gt;
text-transform:capitalize&lt;/code&gt; declaration, Internet Explorer capitalizes the first letter &lt;strong&gt;and&lt;/strong&gt; 
the letter after the hyphen in hyphenated words. However, Firefox 3 and Firefox 3.5 
only capitalizes the first letter of hyphenated words. Therefore, &lt;code&gt;
text-transform:capitalize&lt;/code&gt; should not be used on elements that contain 
hyphenated words.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-580511367788620613?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/580511367788620613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=580511367788620613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/580511367788620613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/580511367788620613'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/text-transform-property.html' title='The text-transform Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__ZdUHId0XUA/SvrSyycb5lI/AAAAAAAAARk/QBIGXTtWu2E/s72-c/text-transform+testing_uppercase+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7251692555419189087</id><published>2009-11-10T19:23:00.000+05:30</published><updated>2009-11-10T19:23:57.123+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The text-align Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;text-align&lt;/code&gt; property specifies the alignment of text and 
images within the content area of a line. It can 
align the em boxes of text (and image content boxes) to the left side of the line box or 
to the right 
side of the line box; it can center the string of em boxes (along with image 
content boxes) on the line, and it can justify text. To 
justify text, the word spacing is increased so that the 
beginning and ending of the text (or images) on each line is aligned to the left and right 
side. &lt;/p&gt;
&lt;p&gt;The &lt;code&gt;text-align&lt;/code&gt; property can be applied to block-level 
elements and table cells. It can take the keywords &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;, &lt;code&gt;
right&lt;/code&gt;, &lt;code&gt;justify&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. It is an inherited 
property. In all major browsers for English, text is left-aligned by default.&lt;/p&gt;
&lt;p&gt;Note: The &lt;code&gt;text-align&lt;/code&gt; property cannot be directly applied to 
inline elements.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;text-align:left&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-align:left&lt;/code&gt; on an element aligns the last em box&amp;#39;s (or 
image box&amp;#39;s) left 
edge to the left edge of the content area on each line, without changing the 
word spacing of the line. All the remaining em boxes (and image boxes) on the 
line are positioned with their left edge against the right edge of the 
previously positioned em box. Since text in English is already aligned to the 
left by default, in English web pages, &lt;code&gt;text-align:left&lt;/code&gt; is 
only useful to override another &lt;code&gt;text-align&lt;/code&gt; declaration on an element.&lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;div style=&amp;quot;text-align:right&amp;quot;&amp;gt;&amp;lt;p class=&amp;quot;test&amp;quot; 
style=&amp;quot;text-align:left&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;brown&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;fox&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;jumps&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;over&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;lazy&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;dog.&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;The&amp;lt;/span&amp;gt; five boxing wizards jump 
quickly.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/SvlvU5-BUmI/AAAAAAAAARE/CNm6Oi1Ek50/s1600-h/text-align+testing_left.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/SvlvU5-BUmI/AAAAAAAAARE/CNm6Oi1Ek50/s320/text-align+testing_left.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;text-align&lt;/code&gt; declaration on the &lt;code&gt;
&amp;lt;p&amp;gt;&lt;/code&gt; overrides the &lt;code&gt;text-align&lt;/code&gt; declaration on the &lt;code&gt;div&lt;/code&gt; and 
left-aligns the text in &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;.&lt;/p&gt;

 
&lt;h4&gt;&lt;code&gt;text-align:right&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-align:right&lt;/code&gt; on an element aligns the last em box&amp;#39;s (or 
image box&amp;#39;s) right 
edge to the right edge of the content area on each line, without changing the 
word spacing of the line. All the remaining em boxes (and image boxes) on the 
line are positioned with their right edge against the left edge of the 
previously positioned em box.&lt;/p&gt;
 
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;text-align:right&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;brown&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;fox&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;jumps&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;over&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;lazy&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;dog.&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;The&amp;lt;/span&amp;gt; five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt; &lt;/p&gt;
 
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvlvXsvjvFI/AAAAAAAAARM/9gy7yEaFlls/s1600-h/text-align+testing_right.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvlvXsvjvFI/AAAAAAAAARM/9gy7yEaFlls/s320/text-align+testing_right.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the right edge of the last em box of each line is 
aligned to the right edge of the content area. The word 
spacing is not altered.&lt;/p&gt;
 
&lt;h4&gt;&lt;code&gt;text-align:center&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-align:center&lt;/code&gt; adjusts the postion of the em boxes (and image 
boxes), without 
changing the word spacing, in such a way that the amount of space between the 
left edge of the first em box (or image box) and the left edge of the content area is equal to 
the amount of space between the right edge of the last em box (or image box) and the right edge 
of the content area.&lt;/p&gt;
&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New 
Roman&amp;#39;;text-align:center&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;brown&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;fox&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;jumps&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;over&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;lazy&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;dog.&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;The&amp;lt;/span&amp;gt; five boxing wizards jump 
quickly.&amp;lt;/p&lt;/code&gt;&amp;gt;&lt;/p&gt;
 
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/SvlvZAxgdPI/AAAAAAAAARU/pIl5k0KvBZ8/s1600-h/text-align+testing_center.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/SvlvZAxgdPI/AAAAAAAAARU/pIl5k0KvBZ8/s320/text-align+testing_center.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the string of em boxes of each line is centered on the line 
with equal space to the left and the right.&lt;/p&gt;
 
&lt;h4&gt;&lt;code&gt;text-align:justify&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-align:justify&lt;/code&gt; on an element aligns the first em box&amp;#39;s 
(or image box&amp;#39;s) left 
edge to the left edge of the content area and the last em box&amp;#39;s (or image 
box&amp;#39;s) right edge to 
the right edge of the content area on each line by equally increasing the word spacing of 
the text on the line (if necessary).&lt;/p&gt;
&lt;p&gt;All major browsers justify text by increasing the word spacing, they do &lt;strong&gt;not&lt;/strong&gt; alter the letter spacing.&lt;/p&gt;
&lt;p&gt;All major browsers justify the text in an element only when the text (and 
images) span 
more than one line.&lt;/p&gt;
&lt;p&gt;If an element has both a &lt;code&gt;word-spacing&lt;/code&gt; length declaration 
and &lt;code&gt;word-spacing:justify&lt;/code&gt;, then the browser ignores the &lt;code&gt;
word-spacing&lt;/code&gt; declaration and increases the word spacing (if necessary) in order to 
justify the text.&lt;/p&gt;
&lt;p&gt;Note that the actual amount of additional word spacing between 
individual pairs of words (or images) may differ between browsers, but the sum of the 
added spacing is the same 
for a particular line of text, for a particular width of the content area. &lt;/p&gt;
 
&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p class=&amp;quot;test&amp;quot; style=&amp;quot;text-align:justify&amp;quot;&amp;gt;&amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;brown&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;fox&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;jumps&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;over&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;the&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;lazy&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;dog.&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;The&amp;lt;/span&amp;gt; five boxing wizards jump quickly.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
 
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SvlvbAOvA5I/AAAAAAAAARc/redc9bL7Ztc/s1600-h/text-align+testing_justify.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SvlvbAOvA5I/AAAAAAAAARc/redc9bL7Ztc/s320/text-align+testing_justify.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the word spacing between words is increased such that 
there is no space between the left and right edges of the content area and the 
first and last em boxes (or image boxes) of each line.&lt;/p&gt;
 
&lt;h4&gt;&lt;code&gt;text-align:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;text-align:inherit&lt;/code&gt; is used to override another &lt;code&gt;text-align&lt;/code&gt; 
declaration that has been applied to an element, and to restore the default 
behavior of inheriting the parent element&amp;#39;s text alignment.&lt;/p&gt;
&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 do not support &lt;code&gt;
text-align:inherit&lt;/code&gt;, they ignore the declaration.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;text-align:inherit&lt;/code&gt; declaration should be avoided because 
Internet Explorer 6 and Internet Explorer 7 ignore it.&lt;/p&gt;
&lt;p&gt;All the other keywords of &lt;code&gt;text-align&lt;/code&gt; are fully supported in all 
major browsers.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7251692555419189087?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7251692555419189087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7251692555419189087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7251692555419189087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7251692555419189087'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/text-align-property.html' title='The text-align Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__ZdUHId0XUA/SvlvU5-BUmI/AAAAAAAAARE/CNm6Oi1Ek50/s72-c/text-align+testing_left.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-3986099155663395738</id><published>2009-11-08T13:02:00.001+05:30</published><updated>2009-11-08T13:07:01.686+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The letter-spacing Property</title><content type='html'>&lt;p&gt;The &lt;code&gt;letter-spacing&lt;/code&gt; property is used to adjust the space 
between letters. The &lt;code&gt;letter-spacing&lt;/code&gt; 
property reduces or increases the width of the em boxes of 
letters. Note that this property does not change the distance between the em 
boxes, which is always zero.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;letter-spacing&lt;/code&gt; property can be applied to any element. It can 
take length values and the keywords &lt;code&gt;normal&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. 
It is an inherited property. The initial values is &lt;code&gt;normal&lt;/code&gt;. A &lt;code&gt;length&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; is 
equivalent to &lt;code&gt;normal&lt;/code&gt;. Negative values are allowed; they reduce the 
width of em boxes.&lt;/p&gt;

&lt;p&gt;Note 1: The &lt;dfn&gt;em box&lt;/dfn&gt; is the box that a glyph occupies.&lt;/p&gt;
&lt;p&gt;Note 2: The &lt;code&gt;letter-spacing&lt;/code&gt; property does not take percentage values.&lt;/p&gt;
&lt;p&gt;Note 3: When the &lt;code&gt;letter-spacing&lt;/code&gt; property has a length value, the 
letter spacing of the text cannot be changed by the &lt;code&gt;
text-align&lt;/code&gt; property.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;letter-spacing&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;

&lt;p&gt;The number of &lt;code&gt;px&lt;/code&gt; declared in the &lt;code&gt;letter-spacing&lt;/code&gt; 
declaration is the number of extra pixels of width added to the em boxes it is 
applied to. &lt;/p&gt;
&lt;p&gt;Example 1a): &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 35px&amp;quot;&amp;gt;&amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; brown fox @&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyxyDdcvI/AAAAAAAAAQk/mp3vKiRZDQY/s1600-h/letter-spacing+testing_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyxyDdcvI/AAAAAAAAAQk/mp3vKiRZDQY/s320/letter-spacing+testing_0.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, there is no &lt;code&gt;letter-spacing&lt;/code&gt; 
declaration, therefore the em boxes are of default width. The default em box 
sizes for the letter is &amp;quot;t&amp;quot; is 10px, &amp;quot;h&amp;quot; is 18px, and &amp;quot;e&amp;quot; is 15px.&lt;/p&gt;
&lt;p&gt;Example 1b): &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;letter-spacing: 
10px&amp;quot;&amp;gt;&amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; brown fox @&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyy8aBw3I/AAAAAAAAAQs/4kLu0uD7zmM/s1600-h/letter-spacing+testing_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyy8aBw3I/AAAAAAAAAQs/4kLu0uD7zmM/s320/letter-spacing+testing_1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the width of the em boxes of the &amp;lt;p&amp;gt; and its 
descendants have been increased by 10px. Therefore, the width of the em boxes 
are: &amp;quot;t&amp;quot; 20px, &amp;quot;h&amp;quot; 28px, and &amp;quot;e&amp;quot; 25px.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;letter-spacing: -3px&amp;quot;&amp;gt;the &amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; brown fox @&amp;amp;Acirc;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/__ZdUHId0XUA/SvZy0yZ4jXI/AAAAAAAAAQ8/XCIQihk4PjA/s1600-h/letter-spacing+testing_negative_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/__ZdUHId0XUA/SvZy0yZ4jXI/AAAAAAAAAQ8/XCIQihk4PjA/s320/letter-spacing+testing_negative_1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;letter-spacing&lt;/code&gt; value is negative. This 
results in the following em box widths: &amp;quot;t&amp;quot; 7px, &amp;quot;h&amp;quot; 15px, and &amp;quot;e&amp;quot; 12px.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;letter-spacing&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;

&lt;p&gt;When letter spacing is declared in &lt;code&gt;em&lt;/code&gt;, the &lt;code&gt;em&lt;/code&gt; value is 
multiplied with the font-size to give the number of pixels that are added to the 
width of the em boxes in the element.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;letter-spacing: 0.5em&amp;quot;&amp;gt;&amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt; 
&amp;lt;span&amp;gt;t&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;h&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;e&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyz_lBY0I/AAAAAAAAAQ0/0riYm5oSVbY/s1600-h/letter-spacing+testing_em_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyz_lBY0I/AAAAAAAAAQ0/0riYm5oSVbY/s320/letter-spacing+testing_em_1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In the above example, the declared em value (0.5em) is multiplied with the 
font-size to give 17.5px (0.5 * 35). This is added to the width of the em box. 
This results in the following em box widths: &amp;quot;t&amp;quot; 28px, &amp;quot;h&amp;quot; 36px, 
and &amp;quot;e&amp;quot;  
33px.&lt;/p&gt;
&lt;p&gt;However, Internet Explorer 6 and Internet Explorer 7, calculate em &lt;code&gt;letter-spacing&lt;/code&gt; 
declarations to a much smaller value due to a bug.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;letter-spacing:normal&lt;/code&gt; &lt;/h4&gt;
&lt;p&gt;&lt;code&gt;letter-spacing:normal&lt;/code&gt; restores the em box width to the default 
sizes. Since &lt;code&gt;letter-spacing&lt;/code&gt; is an inherited 
property, the &lt;code&gt;normal&lt;/code&gt; keyword can be used to restore the default 
letter spacing in an element that has inherited a modified letter spacing 
declaration.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;letter-spacing:inherit&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;letter-spacing:inherit&lt;/code&gt; is used to override another &lt;code&gt;
letter-spacing&lt;/code&gt; declaration 
that has been applied to an element, and to restore the default behavior of 
inheriting the parent element&amp;#39;s letter spacing.&lt;/p&gt;

&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 do not support &lt;code&gt;
letter-spacing:inherit&lt;/code&gt;, they ignore it.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;

&lt;p&gt;For consistent results in all browsers, &lt;code&gt;letter-spacing&lt;/code&gt; with &lt;code&gt;
em&lt;/code&gt; values should be avoided (Internet Explorer 6 and Internet Explorer 7 
calculate them incorrectly).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;letter-spacing:inherit&lt;/code&gt; should also be avoided because Internet 
Explorer 6 and Internet Explorer 7 do not support it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;letter-spacing&lt;/code&gt; declarations in &lt;code&gt;px&lt;/code&gt; are supported in all browsers and is therefore the 
recommended way of using the property.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-3986099155663395738?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/3986099155663395738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=3986099155663395738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3986099155663395738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/3986099155663395738'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/letter-spacing-property.html' title='The letter-spacing Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__ZdUHId0XUA/SvZyxyDdcvI/AAAAAAAAAQk/mp3vKiRZDQY/s72-c/letter-spacing+testing_0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-7493519249067442652</id><published>2009-11-06T12:52:00.003+05:30</published><updated>2009-11-10T20:24:52.813+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The word-spacing Property</title><content type='html'>&lt;p&gt;Updated: Nov 10, 2009

&lt;p&gt;The &lt;code&gt;word-spacing&lt;/code&gt; property is used to &lt;strong&gt;modify&lt;/strong&gt; the 
width of certain whitespace characters. Therefore, it modifies the distance 
between the words (or images) in an element. In CSS, a &lt;dfn&gt;word&lt;/dfn&gt; is considered to be a one or more 
(non-whitespace) glyphs with whitespace surrounding it. The &lt;code&gt;word-spacing&lt;/code&gt; 
property does not &lt;strong&gt;specify&lt;/strong&gt; the width of whitespace characters, it only specifies the 
amount of space to be added or removed from the default width.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;word-spacing&lt;/code&gt; property can be applied to any element. It can 
take length values and the keywords &lt;code&gt;normal&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;. 
It is an inherited property. The initial values is &lt;code&gt;normal&lt;/code&gt;. A &lt;code&gt;length&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; is 
equivalent to &lt;code&gt;normal&lt;/code&gt;. Negative values are allowed; they reduce the 
space between the words.&lt;/p&gt;

&lt;p&gt;Note: The &lt;code&gt;word-spacing&lt;/code&gt; property does not take percentage values&lt;/p&gt;
&lt;p&gt;The width of the space character depends on the font family and font size.
&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;word-spacing&lt;/code&gt; property affects each space (U+0020), non-breaking 
space (U+00A0), and ideographic space (U+3000) left in the text after the white 
space processing rules have been applied. Source: &lt;a href="http://www.w3.org/TR/CSS21/text.html#spacing-props"&gt;&lt;cite&gt;http://www.w3.org/TR/CSS21/text.html#spacing-props&lt;/cite&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;According to the specification, therefore, other white space characters such 
as &lt;code&gt;&amp;amp;ensp;&lt;/code&gt;, &lt;code&gt;&amp;amp;emsp;&lt;/code&gt;, and &lt;code&gt;&amp;amp;thinsp;&lt;/code&gt; are not affected by the &lt;code&gt;word-spacing&lt;/code&gt; 
property. However, Internet Explorer 6 and Internet Explorer 7, modify the 
word spacing of these characters also. This is a bug. Firefox 3 and Firefox 3.5 
do &lt;strong&gt;not&lt;/strong&gt; modify the width of the non-breaking space character
&lt;code&gt;&amp;amp;nbsp;&lt;/code&gt;. This is a bug.&lt;/p&gt;
&lt;p&gt;Note: Since the &lt;code&gt;word-spacing&lt;/code&gt; property affects the width of 
certain whitespace characters, it not only affects the spacing of words, but 
also the space between images that are separated by those whitespace characters.

&lt;h4&gt;&lt;code&gt;word-spacing&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;

&lt;p&gt;The number of &lt;code&gt;px&lt;/code&gt; declared in the &lt;code&gt;word-spacing&lt;/code&gt; 
declaration is added to the normal width of the space character. &lt;/p&gt;
&lt;p&gt;Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;word-spacing: 10px&amp;quot;&amp;gt;the &amp;lt;span&amp;gt;quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;brown&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SvPVJ0CmMyI/AAAAAAAAAQM/YyKGcZFD4eE/s1600-h/word-spacing+testing_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SvPVJ0CmMyI/AAAAAAAAAQM/YyKGcZFD4eE/s640/word-spacing+testing_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the default width of the space character is 9px. 
Therefore, the default space between words is 9px. However, since the word 
spacing is declared as 10px, 10px is added to the default spacing which results 
in word spacing of 19px.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;word-spacing: -20px&amp;quot;&amp;gt;the &amp;lt;span&amp;gt;five quick&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;boxing&amp;lt;/span&amp;gt; 
wizards&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/__ZdUHId0XUA/SvPVOscBirI/AAAAAAAAAQc/Lo4kKmit3Yo/s1600-h/word-spacing+testing_negative_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/__ZdUHId0XUA/SvPVOscBirI/AAAAAAAAAQc/Lo4kKmit3Yo/s640/word-spacing+testing_negative_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the &lt;code&gt;word-spacing&lt;/code&gt; value is negative. Since 
the default width of the space character is 9px, the final word spacing is 9px 
-20px = -11px. Therefore, the beginning and ends of words will overlap each 
other.&lt;/p&gt;
&lt;p&gt;Firefox 3 and Firefox 3.5 do not reduce the word spacing between two inline 
elements (e.g. spans) to less than zero. This is a bug. Internet Explorer 8 does 
not reduce the word spacing to less than zero. This is a bug.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;word-spacing&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;

&lt;p&gt;When word spacing is declared in &lt;code&gt;em&lt;/code&gt;, the &lt;code&gt;em&lt;/code&gt; value is 
multiplied with the font-size to give the number of pixels that is added to the 
width of the space character in the element.&lt;/p&gt;
&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-family:&amp;#39;Times New Roman&amp;#39;;font-size: 
35px;word-spacing: 1.5em&amp;quot;&amp;gt;the &amp;lt;span&amp;gt;fox&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;on&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/__ZdUHId0XUA/SvPVMd0wL6I/AAAAAAAAAQU/dMNWU5w9pP0/s1600-h/word-spacing+testing_em_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/__ZdUHId0XUA/SvPVMd0wL6I/AAAAAAAAAQU/dMNWU5w9pP0/s320/word-spacing+testing_em_1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the above example, the declared em value (1.5em) is multiplied with the 
font-size to give 52.5px (1.5 * 35). This is added to the width of the space 
character to give 61.5px which rounds off to 62px. However, Firefox 3 and 
Firefox 3.5, due to a rounding off error, increase the word spacing to only 61px. Internet Explorer 8 increases the 
word spacing to 62px. Internet Explorer 6 and Internet Explorer 7 increases the 
word spacing to only 33px. This is a bug.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;word-spacing:normal&lt;/code&gt; restores the word spacing to the default 
width of the space character. Since &lt;code&gt;word-spacing&lt;/code&gt; is an inherited 
property, the &lt;code&gt;normal&lt;/code&gt; keyword can be used to restore the default 
word spacing in an element that has inherited a modified word spacing 
declaration.&lt;/p&gt;

&lt;h4&gt;&lt;code&gt;word-spacing:inherit&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;word-spacing:inherit&lt;/code&gt; is used to override another &lt;code&gt;word-spacing&lt;/code&gt; declaration 
that has been applied to an element, and to restore the default behavior of 
inheriting the parent element&amp;#39;s word spacing.&lt;/p&gt;

&lt;p&gt;Internet Explorer 6 and Internet Explorer 7 do not support &lt;code&gt;word-spacing:inherit&lt;/code&gt;, they ignore it.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;

&lt;p&gt;For consistent results in all browsers, &lt;code&gt;word-spacing&lt;/code&gt; with &lt;code&gt;
em&lt;/code&gt; values should be avoided (Internet Explorer 6 and Internet Explorer 7 
calculate them incorrectly).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;word-spacing:inherit&lt;/code&gt; should also be avoided because Internet 
Explorer 6 and Internet Explorer 7 do not support it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;word-spacing&lt;/code&gt; declarations that result in negative word spacing 
should be avoided because they are not supported by Internet Explorer 8. Also, 
in Firefox 3 and Firefox 3.5, if an element with negative word spacing contains 
child inline elements, the word spacing between them is not reduced to less than 
zero. This is a bug. &lt;/p&gt;
&lt;p&gt;Using the &lt;code&gt;word-spacing&lt;/code&gt; declaration on elements that contain the 
character entities &lt;code&gt;&amp;amp;ensp;&lt;/code&gt;, &lt;code&gt;&amp;amp;emsp;&lt;/code&gt;, &lt;code&gt;&amp;amp;thinsp;&lt;/code&gt;, 
and &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt; is not recommended because of bugs in Internet Explorer 6, Internet Explorer 7, Firefox 3 and Firefox 
3.5 (as mentioned earlier).&lt;/p&gt;
&lt;p&gt;Apart from the exceptions mentioned above, &lt;code&gt;word-spacing&lt;/code&gt; declarations in &lt;code&gt;px&lt;/code&gt; that result in 
positive word spacing are supported in all browsers and is therefore the 
recommended way of using the property.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-7493519249067442652?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/7493519249067442652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=7493519249067442652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7493519249067442652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/7493519249067442652'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/word-spacing-property.html' title='The word-spacing Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__ZdUHId0XUA/SvPVJ0CmMyI/AAAAAAAAAQM/YyKGcZFD4eE/s72-c/word-spacing+testing_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1045943164716327909</id><published>2009-11-03T21:54:00.004+05:30</published><updated>2009-11-04T15:18:27.915+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The text-indent Property</title><content type='html'>&lt;p&gt;Made minor corrections: Nov 04, 2009&lt;/p&gt;
&lt;p&gt;
The &lt;code&gt;text-indent&lt;/code&gt; property is used to indent the first line of a block-level element. Adding or removing space from the beginning of a line is called &lt;dfn&gt;indentation&lt;/dfn&gt;.&lt;/p&gt;
&lt;p&gt;
The &lt;code&gt;text-indent&lt;/code&gt; property can be applied to block-level elements only. It can accept length values, percentage values and the keyword &lt;code&gt;inherit&lt;/code&gt;. Percentage values refer to the width of the parent block-level element. Em values refer the font size of the element to which the &lt;code&gt;text-indent&lt;/code&gt; property is applied. Negative values are allowed, these result in space being &lt;strong&gt;removed&lt;/strong&gt; from the beginning of a line. The &lt;code&gt;text-indent&lt;/code&gt; property is inherited by child block-level elements. &lt;/p&gt;
&lt;p&gt;
Note 1: When the &lt;code&gt;text-indent&lt;/code&gt; declaration has a percentage value, the declared percentage value is inherited by child block elements. However, in Internet Explorer 6 and 7 and in Opera 10, the computed value is inherited.&lt;/p&gt;
&lt;p&gt;
Note 2: When the &lt;code&gt;text-indent&lt;/code&gt; declaration has an &lt;code&gt;em&lt;/code&gt; value, in Firefox 3, Firefox 3.5, Opera 10, Safari 4 and Chrome 3 the computed value is inherited by child block elements. However, Internet Explorer 6, 7, and 8, the declared &lt;code&gt;em&lt;/code&gt; value is inherited by child block elements.&lt;/p&gt;
&lt;h4&gt;
&lt;code&gt;text-indent&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;
Example 1: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;text-indent: 20px&amp;quot;&amp;gt;The @&amp;amp;Acirc; The quick brown fox jumps over the lazy dog. The five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/SvBazUCCgBI/AAAAAAAAAPk/y4lHyXpEhOI/s1600-h/text-indent_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 147px; height: 92px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SvBazUCCgBI/AAAAAAAAAPk/y4lHyXpEhOI/s400/text-indent_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399915790814314514" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
In the above example, the first line is indented by 20px. Subsequent lines are not indented.&lt;/p&gt;
&lt;p&gt;
Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;text-indent:-20px&amp;quot;&amp;gt;the quick brown @&amp;amp;Acirc; fox jumps over the lazy dog. The five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/SvBbHxcwEZI/AAAAAAAAAPs/byYyFlSygkw/s1600-h/text-indent_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 144px; height: 82px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/SvBbHxcwEZI/AAAAAAAAAPs/byYyFlSygkw/s400/text-indent_2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399916142308364690" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
In the above example, the first line of the &amp;lt;p&amp;gt; has a negative indent. This is called a &lt;dfn&gt;hanging indent&lt;/dfn&gt;. A negative value to &lt;code&gt;text-indent&lt;/code&gt; causes the beginning of the line to hang out of the line box. Note that since the text is outside the line box, it does not have the background image of the &amp;lt;p&amp;gt; behind it. Also, unless the &amp;lt;p&amp;gt; has margin + padding to the left of it that is at least equal to the amount of negative indentation, some part of the text will fall out of the viewport and will not be visible.&lt;/p&gt;
&lt;h4&gt;
&lt;code&gt;text-indent&lt;/code&gt; with percentage values&lt;/h4&gt;
&lt;p&gt;
When the &lt;code&gt;text-indent&lt;/code&gt; property has a percentage value, the amount of indentation is calculated by multiplying the percentage with the width of the parent block element. Every block-level element that can be displayed has the &lt;code&gt;body&lt;/code&gt; element as the ancestor. Therefore, if no other parent element exists, then the percentage is calculated with respect to the width of the &lt;code&gt;body&lt;/code&gt; element. The width of the &lt;code&gt;body&lt;/code&gt; element can be its CSS declared width or, if it has no width declared, the width of the browser window. When the amount of indentation is dependent on the width of the browser window, the indentation changes each time the user changes the width of the browser window.&lt;/p&gt;
&lt;p&gt;
Example 3: &lt;code&gt;&amp;lt;div style=&amp;quot;width:450px&amp;quot;&amp;gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;text-indent: 4.5%&amp;quot;&amp;gt;The @&amp;amp;Acirc; The quick brown fox jumps over the lazy dog. The five boxing wizards jump quickly&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
In the above example, the width of the parent block-level element is 450px. Therefore the amount of indentation is 20px (4.5% of 450px = 20.25px, rounded to 20px). Therefore, the line should look exactly like the one in Example 1. In Firefox 3, Firefox 3.5 and Internet Explorer 8, the line is indented 20px and looks exactly like the line in Example 1. However, in Internet Explorer 6 and in Internet Explorer 7, the line is indented 34px. Therefore, Internet Explorer 6&amp;#39;s and Internet Explorer 7&amp;#39;s implementation of &lt;code&gt;text-indent&lt;/code&gt; with percentage values is buggy.&lt;/p&gt;
&lt;h4&gt;
&lt;code&gt;text-indent&lt;/code&gt; with &lt;code&gt;em&lt;/code&gt; values&lt;/h4&gt;
&lt;p&gt;
When the &lt;code&gt;text-indent&lt;/code&gt; property has an &lt;code&gt;em&lt;/code&gt; value, the amount of indentation is calculated by multiplying the &lt;code&gt;em&lt;/code&gt; value with the font size of the element that the &lt;code&gt;text-indent&lt;/code&gt; property has been applied to.&lt;/p&gt;
&lt;p&gt;
Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:&amp;#39;Times New Roman&amp;#39;;text-indent:0.57em&amp;quot;&amp;gt;The @&amp;amp;Acirc; The quick brown fox jumps over the lazy dog. The five boxing wizards jump quickly&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
In the above example, the font size of the &amp;lt;p&amp;gt; is 35px and the text-indent declaration has a value of 0.57em. This is computed to 20px (0.57 * 35 = 19.95px, rounded to 20px). Therefore, the above line will look exactly the same as the line in Example 1.&lt;/p&gt;
&lt;h4&gt;
&lt;code&gt;text-indent:inherit&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;
&lt;code&gt;text-indent:inherit&lt;/code&gt; is used to override another &lt;code&gt;text-indent&lt;/code&gt; declaration that has been applied to an element. If an ancestor element has a percentage &lt;code&gt;text-indent&lt;/code&gt; declaration, then in Firefox 3, Firefox 3.5 and Internet Explorer 8 the descendant element inherits the percentage value. If an ancestor element has an &lt;code&gt;em&lt;/code&gt;&lt;code&gt;text-indent&lt;/code&gt; declaration, then in Firefox 3 and Firefox 3.5, the computed value is inherited by the descendant element. However, in Internet Explorer 8, the &lt;code&gt;em&lt;/code&gt; value in inherited. If an ancestor element has a &lt;code&gt;px&lt;/code&gt;&lt;code&gt;text-indent&lt;/code&gt; declaration, then the &lt;code&gt;px&lt;/code&gt; value is inherited by the descendant element in Firefox 3, Firefox 3.5, Internet Explorer 7 and Internet Explorer 8.&lt;/p&gt;
&lt;p&gt;
Note: Internet Explorer 6 sometimes ignores the &lt;code&gt;text-indent:inherit&lt;/code&gt; declaration&lt;/p&gt;
&lt;h4&gt;
Conclusion&lt;/h4&gt;
&lt;p&gt;
Percentage values with &lt;code&gt;text-indent&lt;/code&gt; must be avoided because Internet Explorer 6 and Internet Explorer 7 calculate them incorrectly, also in these browsers descendant elements inherit computed values whereas Firefox 3, Firefox 3.5 and Internet Explorer 8 inherit the percentage values. This may result in inconsistent rendering across different browsers.&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;em&lt;/code&gt; values with &lt;code&gt;text-indent&lt;/code&gt; must be avoided because in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8, descendant elements inherit the declared &lt;code&gt;em&lt;/code&gt; value whereas Firefox 3 and Firefox 3.5 inherit the computed values. This may result in inconsistent rendering across different browsers.&lt;/p&gt;
&lt;p&gt;
Therefore, for consistent results across browsers, &lt;code&gt;text-indent&lt;/code&gt; with &lt;code&gt;px&lt;/code&gt; values should be used.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1045943164716327909?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1045943164716327909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1045943164716327909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1045943164716327909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1045943164716327909'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/text-indent-property.html' title='The text-indent Property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/SvBazUCCgBI/AAAAAAAAAPk/y4lHyXpEhOI/s72-c/text-indent_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-491022509103281855</id><published>2009-11-01T23:05:00.016+05:30</published><updated>2009-11-02T00:09:27.478+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The vertical-align property</title><content type='html'>&lt;p&gt;The CSS property &lt;code&gt;vertical-align&lt;/code&gt; is used to alter the vertical position of inline and replaced elements (it has no effect on block elements). With this property, various parts of inline and replaced elements can be aligned to various parts of the line box. For example, the top of an image can be aligned to the top of the parent element's content box.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;vertical-align&lt;/code&gt; property's values can either be keywords, percentages or length values. It is not an inherited property. It has the initial value &lt;code&gt;baseline&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Note: The &lt;dfn&gt;ascent&lt;/dfn&gt; is the distance between the baseline and the top of the content box. The &lt;dfn&gt;descent&lt;/dfn&gt; is the distance between the baseline and the bottom of the content box. The size of the &lt;dfn&gt;leading&lt;/dfn&gt; of a text line box can be obtained by subtracting the height of the line box from the height of the content box. The leading can be either positive (extra space above and below the content box) or negative (the line box cuts off some space from the top and bottom of the content box). The &lt;dfn&gt;top half-leading&lt;/dfn&gt; and the &lt;dfn&gt;bottom half-leading&lt;/dfn&gt; is the amount of space (added or removed) above and below the content box, respectively. &lt;/p&gt;&lt;h4&gt;Keywords&lt;/h4&gt;&lt;p&gt;These are the keywords that can be used with the &lt;code&gt;vertical-align&lt;/code&gt; property: &lt;code&gt;baseline&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;text-top&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;text-bottom, middle,&lt;/code&gt;&lt;code&gt;super, sub&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt;.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:baseline&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;This is the initial, default value of &lt;code&gt;vertical-align&lt;/code&gt;. Therefore &lt;code&gt;vertical-align:baseline&lt;/code&gt; is only used to override another &lt;code&gt;vertical-align&lt;/code&gt; declaration that was applied to an element.&lt;/p&gt;&lt;p&gt;Example: &lt;code&gt;&amp;lt;p&amp;gt;the quick brown &amp;lt;em class=&amp;quot;raised&amp;quot; style="vertical-align:baseline"&amp;gt;fox&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:top&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The declaration &lt;code&gt;vertical-align:top&lt;/code&gt; aligns the top of an element's line box to the top of its parent element's line box.&lt;/p&gt;&lt;p&gt;Example 1a: &lt;code&gt;&amp;lt;p style="font-size:35px;font-family:'Times New Roman'"&amp;gt;the @&amp;Acirc;&amp;lt;span style="line-height: 59px"&amp;gt;@&amp;Acirc; five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3QGWDJ9YI/AAAAAAAAAOE/__5hD6ZmYrM/s1600-h/vertical-align_top_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 256px; height: 69px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3QGWDJ9YI/AAAAAAAAAOE/__5hD6ZmYrM/s400/vertical-align_top_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399200335703700866" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the line box of the span has a height of 59px and the line box of the &amp;lt;p&amp;gt; expands to accommodate the span line box. However, without the span, the &amp;lt;p&amp;gt; line box would have a height of only 40px.&lt;/p&gt;&lt;p&gt;Example 1b: &lt;code&gt;&amp;lt;p &lt;/code&gt;&lt;code&gt;style="font-size:35px;font-family:'Times New Roman'"&lt;/code&gt;&lt;code&gt;&amp;gt;the @&amp;Acirc;&amp;lt;span style="vertical-align:top;line-height: 59px"&amp;gt;@&amp;Acirc; five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3QoEkSLXI/AAAAAAAAAOM/77zbKCMfg_I/s1600-h/vertical-align_top_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 260px; height: 67px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3QoEkSLXI/AAAAAAAAAOM/77zbKCMfg_I/s400/vertical-align_top_2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399200915126365554" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the &lt;code&gt;vertical-align:top&lt;/code&gt; declaration causes the top of the span line box to be aligned to the top of the &amp;lt;p&amp;gt; line box. However, in Internet Explorer 6 and Internet Explorer 7 the &lt;code&gt;vertical-align:top&lt;/code&gt; declaration has no effect. This is a bug.&lt;/p&gt;&lt;p&gt;Example 2: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;img style=&amp;quot;vertical-align:top&amp;quot; src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3Q9-i3zFI/AAAAAAAAAOU/3QehxFvLbiM/s1600-h/vertical-align_top_3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 159px; height: 61px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3Q9-i3zFI/AAAAAAAAAOU/3QehxFvLbiM/s400/vertical-align_top_3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399201291466951762" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the &lt;code&gt;vertical-align:top&lt;/code&gt; declaration causes the top of the image to be aligned to the top of the &amp;lt;p&amp;gt; line box.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;vertical-align:top&lt;/code&gt; declaration has an effect only in the following cases:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;vertical-align:top&lt;/code&gt; on an inline non-replaced element whose ascent + top half-leading is different from its parent's. The ascent + top half-leading of the inline non-replaced element could be different from the parent element's because &lt;ul&gt;&lt;li&gt;a line-height declaration on it, or an inherited raw number line-height declaration, caused it to have a top half-leading that is not equal its parent (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it is of different font size (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it uses a different font whose ascent is different from its parent's (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it contains an element (replaced or non-replaced) that has increased the top half-leading (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:top&lt;/code&gt; on an inline non-replaced element whose parent contains an element (replaced or non-replaced) which increased the top half leading of its (the parent's) line box (with all other CSS text and line box properties being the same)&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:top&lt;/code&gt; on an inline replaced element (e.g. an image) whose height is not equal to the ascent of the text of the element it is contained in (with all other CSS text and line box properties being the same as the parent's)&lt;br&gt; Note: A line height declaration on an image has no effect on its line box&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In all other cases, the top of an element's line box is already aligned with the top of its parent's line box and so, &lt;code&gt;vertical-align:top&lt;/code&gt; has no effect.&lt;/p&gt;&lt;p&gt;Note 1: For the parent element, the ascent + top half-leading  value that is considered is the one measured when it &lt;strong&gt;does not contain the inline element to which the &lt;code&gt;vertical-align&lt;/code&gt; declaration is applied&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Note 2: The ascent + top half-leading is measured from the baseline to the top of an element's line box.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:bottom&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The declaration &lt;code&gt;vertical-align:bottom&lt;/code&gt; aligns the bottom of an element's line box to the bottom of its parent element's line box.&lt;/p&gt;&lt;p&gt;Example 3: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size: 35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;vertical-align:bottom;line-height: 21px&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3RUrQ-YQI/AAAAAAAAAOc/qNAILkpzWJ0/s1600-h/vertical-align_bottom.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 258px; height: 50px;" src="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3RUrQ-YQI/AAAAAAAAAOc/qNAILkpzWJ0/s400/vertical-align_bottom.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399201681428603138" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the span's descent + bottom half-leading is reduced. Therefore, its bottom is not aligned to the bottom of the &amp;lt;p&amp;gt;'s line box which is of normal line height. The &lt;code&gt;vertical-align:bottom&lt;/code&gt; declaration on the span causes its line box to be lowered so that its bottom is aligned to the bottom of the &amp;lt;p&amp;gt; line box.&lt;/p&gt;&lt;p&gt;However, in Internet Explorer 6 and Internet Explorer 7, the &lt;code&gt;vertical-align:bottom&lt;/code&gt; declaration on the span in the example does not have any effect. This is a bug.&lt;/p&gt;&lt;p&gt;On replaced elements, &lt;code&gt;vertical-align:bottom,&lt;/code&gt; causes the bottom of the replaced element's box to align with the bottom of the parent element's line box.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;vertical-align:bottom&lt;/code&gt; declaration has an effect only in the following cases:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;vertical-align:bottom&lt;/code&gt; on an inline non-replaced element whose descent + bottom half-leading is different from its parent's. The descent + bottom half-leading of the inline non-replaced element could be different from its parent's because:&lt;ul&gt;&lt;li&gt; a line-height declaration on it, or an inherited raw number line-height declaration, caused it to have a bottom half-leading that is not equal to its parent (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it is of different font size (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it uses a different font whose descent is different from its parent's (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;it contains an element (replaced or non-replaced) that has increased bottom half-leading (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:bottom&lt;/code&gt; on an inline non-replaced element whose &lt;strong&gt;parent&lt;/strong&gt; contains an element (replaced or non-replaced) which increased the bottom half-leading of its (the parent's) line box (with all other CSS text and line box properties being the same)&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:bottom&lt;/code&gt; on an inline replaced element (e.g. an image) (with all other CSS text and line box properties being the same as the parent's)&lt;br&gt; Note: A line height declaration on an image has no effect on its line box. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In all other cases, the bottom of an element's line box is already aligned with the bottom of its parent's line box and so, &lt;code&gt;vertical-align:&lt;/code&gt;bottom has no effect.&lt;/p&gt;&lt;p&gt;Note 1: For the parent element, the descent + bottom half-leading that is considered is the one measured when it &lt;strong&gt;does not contain the inline element to which the &lt;code&gt;vertical-align&lt;/code&gt; declaration is applied&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Note 2: The descent + bottom half-leading is measured from the baseline to the bottom of the element's line box.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:text-top&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The &lt;code&gt;vertical-align:text-top&lt;/code&gt; declaration aligns the top of an element's line box to the top of its parent element's content box.&lt;/p&gt;&lt;p&gt;The top of an element's content box is also the top of the text and is therefore known as the &lt;dfn&gt;text-top&lt;/dfn&gt;. &lt;/p&gt;&lt;p&gt;Example 4: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman';line-height:60px&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;vertical-align:text-top&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3RniLgivI/AAAAAAAAAOk/OBVmxP11cTY/s1600-h/vertical-align_text-top_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 258px; height: 78px;" src="http://2.bp.blogspot.com/__ZdUHId0XUA/Su3RniLgivI/AAAAAAAAAOk/OBVmxP11cTY/s400/vertical-align_text-top_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399202005407271666" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the declared line height on the &amp;lt;p&amp;gt; is 60px. The inline span inherits this line height. The top of the span's line box is by default aligned to the top of the &amp;lt;p&amp;gt; line box. Therefore, the &lt;code&gt;vertical-align: text-top&lt;/code&gt; declaration on the span causes the line box to move down 10px so that its top is aligned to the the text-top of the &amp;lt;p&amp;gt;.&lt;/p&gt;&lt;p&gt;Since the span line box has moved down 10px and its height is 60px, the &amp;lt;p&amp;gt;'s line box height has to be increased to 70px to accommodate it.&lt;/p&gt;&lt;p&gt;Note 1: In the above example, in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8, the &lt;code&gt;vertical-align: text-top&lt;/code&gt; declaration on the span has no effect. This is a bug.&lt;/p&gt;&lt;p&gt;Note 2: In the above example, if the line height of the &amp;lt;p&amp;gt; had been decreased, then the span line box would have moved up. This is because the span line box's height is reduced (invisibly) and the text-top of the &amp;lt;p&amp;gt; falls out of the line box.&lt;/p&gt;&lt;p&gt;When &lt;code&gt;vertical-align:text-top&lt;/code&gt; is applied to a replaced element (e.g. an image), the top of the image gets aligned to the text-top of its parent.&lt;/p&gt;&lt;p&gt;When an inline non-replaced element and its parent have the same CSS text and line box properties and normal line height, the top of the inline element's line box coincides with the text-top of its parent element's line box. In such a case, &lt;code&gt;vertical-align:text-top&lt;/code&gt; has no effect.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;vertical-align:text-top&lt;/code&gt; declaration has an effect only in the following cases:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;When the top of the line box of an inline element is not in alignment with the top of the content box of its parent. This occurs in the following cases:&lt;ul&gt;&lt;li&gt;When the line height of the inline element is increased or decreased (with all other CSS text and line box properties being the same as the parent's).&lt;br&gt;Note that the line height of an inline element can be increased or decreased either directly (by a &lt;code&gt;line-height&lt;/code&gt; declaration that matches the inline element) or indirectly (inherited from its parent)&lt;/li&gt;&lt;li&gt;When the inline element is of different font size (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;When the inline element uses a different font whose ascent is not equal to the parent element's ascent (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;When the inline element contains an element (replaced or non-replaced) that has increased the top half-leading such that the inline element's ascent + top half-leading is not equal to the parent element's ascent (with all other CSS text and line box properties being the same)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:text-top&lt;/code&gt; on an inline replaced element (e.g. an image) whose height is not equal to its parent's ascent (with all other CSS text and line box properties being the same as the parent's)&lt;br&gt; Note: A line height declaration on an image has no effect on its line box.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In all other cases, the top of an element's line box is already aligned with the text-top of its parent and so, &lt;code&gt;vertical-align:text-top&lt;/code&gt; has no effect.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:text-bottom&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; declaration aligns the bottom of an element's line box to the bottom of its parent element's content box.&lt;/p&gt;&lt;p&gt;The bottom of an element's content box is also the bottom of the text and is therefore known as the &lt;dfn&gt;text-bottom&lt;/dfn&gt;. &lt;/p&gt;&lt;p&gt;Example 5: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;vertical-align:text-bottom;line-height: 59px&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3R67_R8rI/AAAAAAAAAOs/UquiUCIv8Uk/s1600-h/vertical-align_text-bottom_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 260px; height: 74px;" src="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3R67_R8rI/AAAAAAAAAOs/UquiUCIv8Uk/s400/vertical-align_text-bottom_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399202338752819890" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the declared line height on the span is 59px. Therefore the span's line box height is increased to 59px. The height of the content box of the span is 40px. In Firefox 3.5, the top half-leading is 9px and the bottom half-leading is 10px. This gives the line box a height of 59px.&lt;/p&gt;&lt;p&gt;Since the bottom half-leading is 10px, this is the gap between the bottom of the span's line box and the text-bottom of the &amp;lt;p&amp;gt;. Therefore the &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; declaration moves the span line box up by 10px (with respect to the &amp;lt;p&amp;gt;) so that the span line box bottom is aligned with the text-bottom of the &amp;lt;p&amp;gt;.&lt;/p&gt;&lt;p&gt;Note 1: In the above example, in Internet Explorer 6, Internet Explorer 7 and Internet Explorer 8, the &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; declaration on the span has no effect. This is a bug.&lt;/p&gt;&lt;p&gt;Note 2: In the above example if the line height of the span had been decreased, then the span line box would have moved down. This is because the span line box's height is reduced invisibly causing the bottom of the line box to be within the content box.&lt;/p&gt;&lt;p&gt;When &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; is applied to a replaced element (e.g. an image), the bottom of the image gets aligned to the text-bottom of its parent.&lt;/p&gt;&lt;p&gt;When an inline non-replaced element and its parent have the same CSS text and line box properties and normal line height, the bottom of the inline element's line box coincides with the text-bottom of its parent element's line box. In such a case, &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; has no effect.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; declaration has an effect only in the following cases:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;When the bottom of the line box of an inline element is not in alignment with the bottom of the content box of its parent. This occurs in the following cases:&lt;ul&gt;&lt;li&gt;When the line height of the inline element is increased or decreased (with all other CSS text and line box properties being the same as the parent's).&lt;br&gt;Note that the line height of an inline element can be increased or decreased either directly (by a &lt;code&gt;line-height&lt;/code&gt; declaration that matches the inline element) or indirectly (inherited from its parent)&lt;/li&gt;&lt;li&gt;When the inline element is of different font size (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;When the inline element uses a different font whose descent is not equal to the parent element's descent (with all other CSS text and line box properties being the same as the parent's)&lt;/li&gt;&lt;li&gt;When the inline element contains an element (replaced or non-replaced) that has increased the bottom half-leading such that the inline element's descent + bottom half-leading is not equal to the parent element's descent (with all other CSS text and line box properties being the same)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;vertical-align:text-bottom&lt;/code&gt; on an inline replaced element (e.g. an image)(with all other CSS text and line box properties being the same as the parent's)&lt;br&gt; Note: A line height declaration on an image has no effect on its line box. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In all other cases, the bottom of an element's line box is already aligned with the text-bottom of its parent and so, &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; has no effect.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:middle&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The &lt;code&gt;vertical-align:middle&lt;/code&gt; declaration aligns the vertical middle of an element's line box to the height of the parent's baseline (the descent) plus 0.5ex (of the parent). &lt;/p&gt;&lt;p&gt;Example 6: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;img style=&amp;quot;vertical-align:middle&amp;quot; src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3SQiqZnpI/AAAAAAAAAO0/I8HlRaRYrqQ/s1600-h/vertical-align_middle_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 160px; height: 62px;" src="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3SQiqZnpI/AAAAAAAAAO0/I8HlRaRYrqQ/s400/vertical-align_middle_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399202709911477906" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the &amp;lt;p&amp;gt; content box x-height is 16px, therefore 0.5ex is 8px. The baseline height is 8px. The image's height is 50px, therefore the vertical middle of the image will be at 25px (measuring from the bottom). The &lt;code&gt;vertical-align:middle&lt;/code&gt; declaration on the image will therefore align the 25px point on the image to the 32px (16px + 8px) mark. This is true for Firefox 3, Firefox 3.5, Internet Explorer 8, Safari 4 and Chrome 3.&lt;/p&gt;&lt;p&gt;Opera 10 calculates 1ex as 0.5em. In the above example, font size is 35px = 1em, 1ex = 17.5px, 0.5ex = 8.75px. Therefore, the 24px point on the image is aligned to the 17px mark on the &amp;lt;p&amp;gt; content box.&lt;/p&gt;&lt;p&gt;Internet Explorer 6 and 7 also calculate 0.5ex as 8.75px in the above example. In these browsers, the 24px point on the image is aligned to the 19px point on the &amp;lt;p&amp;gt; content box.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:super&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The &lt;code&gt;vertical-align:super&lt;/code&gt; declaration raises the position of the line box of an inline (replaced or non-replaced) element to give it the appearance of a superscript. It does not change the font size or any other property.&lt;/p&gt;&lt;p&gt;The official CSS specification does not specify by how much &lt;code&gt;vertical-align:super&lt;/code&gt; should raise an inline element. Because of this, depending on the browser, the number of pixels by which &lt;code&gt;vertical-align:super&lt;/code&gt; raises an inline element varies.&lt;/p&gt;&lt;p&gt;In a particular browser, the number of pixels that &lt;code&gt;vertical-align:super&lt;/code&gt; raises an inline element depends on the font size of the &lt;strong&gt;parent&lt;/strong&gt; element. It is not affected by the line height of the parent element or any properties of the inline element. The number of pixels the inline element is raised by is measured from the baseline of the &lt;strong&gt;content box&lt;/strong&gt; of the parent element.&lt;/p&gt;&lt;p&gt;Example 7: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;vertical-align:super&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__ZdUHId0XUA/Su3SnFFZoUI/AAAAAAAAAO8/HADWC7O0Efc/s1600-h/vertical-align_super_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 257px; height: 64px;" src="http://1.bp.blogspot.com/__ZdUHId0XUA/Su3SnFFZoUI/AAAAAAAAAO8/HADWC7O0Efc/s400/vertical-align_super_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399203097108652354" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the span line box is raised by 16px in Firefox 3, Firefox 3.5, Interenet Explorer 8 and Opera 10. Internet Explorer 6 and 7 raise it by 20px. Safari and Chrome 3 raise it by 12px. The &amp;lt;p&amp;gt; line box expands to accommodate the raised line box.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:sub&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;The &lt;code&gt;vertical-align:sub&lt;/code&gt; declaration lowers the position of the line box of an inline (replaced or non-replaced) element to give it the appearance of a subscript. It does not change the font size or any other property.&lt;/p&gt;&lt;p&gt;The official CSS specification does not specify by how much &lt;code&gt; vertical-align:sub&lt;/code&gt; should lower an inline element. Because of this, depending on the browser, the number of pixels by which &lt;code&gt;vertical-align:sub&lt;/code&gt; lowers an inline element varies.&lt;/p&gt;&lt;p&gt;In a particular browser, the number of pixels that &lt;code&gt;vertical-align:sub&lt;/code&gt; lowers an inline element depends on the font size of the &lt;strong&gt;parent&lt;/strong&gt; element. It is not affected by the line height of the parent element or any properties of the inline element. The number of pixels the inline element is lowered by is measured from the baseline of the &lt;strong&gt;content box&lt;/strong&gt; of the parent element.&lt;/p&gt;&lt;p&gt;Example 8: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;vertical-align:sub&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3S405UKdI/AAAAAAAAAPE/GXWY_c79HWo/s1600-h/vertical-align_sub_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 260px; height: 53px;" src="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3S405UKdI/AAAAAAAAAPE/GXWY_c79HWo/s400/vertical-align_sub_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399203402000640466" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the span line box is lowered by 5px in Firefox 3 and Firefox 3.5, by 4px in Interent Explorer 8, by 16px in Opera 10, by 20px in Internet Explorer 6 and Internet Explorer 7 and by 8px in Safari 4 and Chrome 3.&lt;/p&gt;&lt;h5&gt;&lt;code&gt;vertical-align:inherit&lt;/code&gt;&lt;/h5&gt;&lt;p&gt;&lt;code&gt;vertical-align&lt;/code&gt; is not an inherited property. However, an element can be made to inherit its parent element's &lt;code&gt;vertical-align&lt;/code&gt; value using the declaration &lt;code&gt;vertical-align:inherit&lt;/code&gt;. This declaration causes an element to inherit the &lt;strong&gt;computed&lt;/strong&gt; value of &lt;code&gt;vertical-align&lt;/code&gt; of its parent element.&lt;/p&gt;&lt;p&gt;Example 12: &lt;code&gt;&amp;lt;p class=&amp;quot;test&amp;quot;&amp;gt;the @&amp;amp;Acirc;&amp;lt;span style=&amp;quot;vertical-align:0.5em&amp;quot;&amp;gt;@&amp;amp;Acirc; five&amp;lt;span style=&amp;quot;vertical-align:inherit;font-size:20px&amp;quot;&amp;gt;@&amp;amp;Acirc; boxing&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3TSpNCItI/AAAAAAAAAPM/olUqg_hH-Xg/s1600-h/vertical-align_inherit_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 66px;" src="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3TSpNCItI/AAAAAAAAAPM/olUqg_hH-Xg/s400/vertical-align_inherit_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399203845538718418" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the child span (to the &amp;lt;p&amp;gt;) is raised by 18px (35px * 0.5 = 17.5px, rounded to 18px). The grand child span has a 3px gap between the bottom of its line box and the bottom of the parent span line box.&lt;/p&gt;&lt;p&gt;When &lt;code&gt;vertical-align:inherit&lt;/code&gt; is applied to the grand child span, it inherits the computed value of &lt;code&gt;vertical-align&lt;/code&gt; from its parent (17.5px). Therefore, the grand child span's line box's bottom will be 21px (17.5px + 3px = 20.5px, rounded to 21px) above the bottom of its parent's line box. In other words, the grand child span's line box will be raised by 18px.&lt;/p&gt;&lt;p&gt;In Firefox 3 and Firefox 3.5, the grand child span is raised by 17px. This is due to a rounding off bug. In Opera 10 the grand child span is raised by 18px. In Internet Explorer 6, Internet Explorer, 7 and Internet Explorer 8 the grand child span is raised by 15px. This is a bug. In Safari 4 and Chrome 3, it raised by 23px. This is a bug.&lt;/p&gt;&lt;h4&gt;Percentage Values with &lt;code&gt;vertical-align&lt;/code&gt;&lt;/h4&gt;&lt;p&gt;When &lt;code&gt;vertical-align&lt;/code&gt; has a percentage value, the distance that the inline element is to be raised or lowered is calculated by multiplying the percentage with the line height of the inline element. The line height may be inherited or declared using CSS. The percentage can be positive or negative. A positive value raises the inline element, a negative value lowers it.&lt;/p&gt;&lt;p&gt;Example 9: &lt;code&gt;&amp;lt;p style=&amp;quot;font-size:35px;font-family:'Times New Roman'&amp;quot;&amp;gt;the @Â&amp;lt;span style=&amp;quot;&amp;quot;&amp;gt;@Â five&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3TmElryfI/AAAAAAAAAPU/WDN8C7JKHFE/s1600-h/vertical-align_percentage1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 258px; height: 80px;" src="http://3.bp.blogspot.com/__ZdUHId0XUA/Su3TmElryfI/AAAAAAAAAPU/WDN8C7JKHFE/s400/vertical-align_percentage1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399204179307383282" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above example, the default line height of the &amp;lt;p&amp;gt; is 40px. Therefore &lt;code&gt; vertical-align:75%&lt;/code&gt; should raise the span by 0.75 * 40 = 30px.&lt;/p&gt;&lt;p&gt;Firefox 3 and Firefox 3.5 raise the span line box by 31px; Internet Explorer 8, Safari 4, Chrome 3 and Opera 10 by 30px. Internet Explorer 6 and Internet Explorer 7 raise the span line box by 26px. This is a bug.&lt;/p&gt;&lt;h4&gt;Length Values - &lt;code&gt;px&lt;/code&gt; and &lt;code&gt;em&lt;/code&gt; with &lt;code&gt;vertical-align&lt;/code&gt;&lt;/h4&gt;&lt;p&gt;The distance that an inline element is raised or lowered by the &lt;code&gt;vertical-align&lt;/code&gt; property can be specified in &lt;code&gt;px&lt;/code&gt; or &lt;code&gt;em&lt;/code&gt;. A positive value raises the inline element, a negative value lowers it.&lt;/p&gt;&lt;p&gt;When specified in &lt;code&gt;em&lt;/code&gt;, to find the distance that the element is moved in &lt;code&gt;px&lt;/code&gt;, the em value is mulitplied with the font size of the &lt;strong&gt;inline element that the &lt;code&gt;vertical-align&lt;/code&gt; declaration is applied to.&lt;/strong&gt; The font size may be inherited or declared directly with CSS. Note that even though the &lt;code&gt;font-size&lt;/code&gt; declaration does not affect the rendering of images, it is used by the browser to convert &lt;code&gt;em&lt;/code&gt; values to pixels when an image has a &lt;code&gt;vertical-align&lt;/code&gt; declaration in em.&lt;/p&gt;&lt;p&gt;Example 10: &lt;code&gt;&amp;lt;p class=&amp;quot;test&amp;quot;&amp;gt;the @Â&amp;lt;img style=&amp;quot;vertical-align:16px&amp;quot; src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Example 11: &lt;code&gt;&amp;lt;p class=&amp;quot;test&amp;quot;&amp;gt;the @Â&amp;lt;img style=&amp;quot;vertical-align:0.45em&amp;quot; src=&amp;quot;20x50.jpg&amp;quot; alt=&amp;quot;20x50 image&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3UCXszRWI/AAAAAAAAAPc/dppErWUNVsA/s1600-h/vertical-align_px_em1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 157px; height: 79px;" src="http://4.bp.blogspot.com/__ZdUHId0XUA/Su3UCXszRWI/AAAAAAAAAPc/dppErWUNVsA/s400/vertical-align_px_em1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399204665473844578" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h4&gt;Browser Bugs&lt;/h4&gt;&lt;p&gt;Internet Explore 6's and Internet Explorer 7's implementation of &lt;code&gt;vertical-align&lt;/code&gt; is extremely buggy. These browsers produce unexpected results when &lt;code&gt;vertical-align&lt;/code&gt; is used on an inline element of reduced or increased line height (inherited or directly declared) and on replaced elements whose parents are of reduced or increased line height. They also compute lower than expected values for &lt;code&gt;vertical-align&lt;/code&gt; percentage declarations.&lt;/p&gt;&lt;p&gt;Firefox 3 displays incorrect rendering when &lt;code&gt;vertical-align:top&lt;/code&gt; is used on a span containing an image that is taller than the ascent. Firefox 3 and Firefox 3.5 compute higher than expected values for &lt;code&gt;vertical-align&lt;/code&gt; percentage declarations.&lt;/p&gt;&lt;p&gt;Opera 10 displays incorrect rendering when &lt;code&gt;vertical-align:bottom&lt;/code&gt; is used on an image that is taller than the ascent on a &amp;lt;p&amp;gt; of increased line height. Opera 10's implementation of &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; is buggy.&lt;/p&gt;&lt;p&gt;Safari 4 and Chrome 3 incorrectly renders the positioning of an image with &lt;code&gt;vertical-align:bottom&lt;/code&gt; on a &amp;lt;p&amp;gt; of decreased line height. These browsers also incorrectly compute a much larger value than expected for &lt;code&gt;vertical-align&lt;/code&gt; percentage declarations.&lt;/p&gt;&lt;p&gt;A bug in Internet Explorer 8, &lt;code&gt;vertical-align:text-bottom&lt;/code&gt; and &lt;code&gt;vertical-align:text-top&lt;/code&gt; produce no effect on a span of increased or decreased line height. The line height on the span can be inherited or directly declared.&lt;/p&gt;&lt;p&gt;The major browsers differ in the distance that they raise or lower elements with &lt;code&gt;vertical-align:sub&lt;/code&gt; and &lt;code&gt;vertical-align:super&lt;/code&gt;.&lt;br&gt;&lt;/p&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;p&gt;The &lt;code&gt;vertical-align&lt;/code&gt; property does not produce consistent results across browsers except when used with &lt;code&gt;px&lt;/code&gt; values. Therefore, for consistent rendering across browsers, &lt;code&gt;vertical-align&lt;/code&gt; with keywords, percentages and em values should be avoided.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-491022509103281855?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/491022509103281855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=491022509103281855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/491022509103281855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/491022509103281855'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/11/vertical-align-property.html' title='The vertical-align property'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__ZdUHId0XUA/Su3QGWDJ9YI/AAAAAAAAAOE/__5hD6ZmYrM/s72-c/vertical-align_top_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-1721543969269597295</id><published>2009-08-08T20:21:00.003+05:30</published><updated>2009-08-08T20:27:53.986+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The Font Matching Process</title><content type='html'>&lt;p&gt;&lt;dfn&gt;Font Matching&lt;/dfn&gt; is the process that a
browser employs to find the font to be used to render an (X)HTML
element. Usually, the process is straightforward, but becomes
complicated when the font-family does not have a font for bold or
italic or small
caps (or for any combination of these), or if it does not contain the
glyphs necessary to render the text.&lt;/p&gt;
&lt;p&gt;Web browsers maintain a database of all the fonts that are
available to a web page — operating system fonts, @font-face
fonts and
the browser's internal fonts (if any).&lt;/p&gt;
&lt;h4&gt;The Font Matching Process&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;All the properties of the font that is required to display
the element are determined.&lt;/li&gt;
  &lt;li&gt;The value of the &lt;code&gt;font-family&lt;/code&gt;
property of the text will be the name of the first font family with
which a match will be attempted.&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;font-style&lt;/code&gt; is handled in
this step:
    &lt;ol style="list-style-type: lower-roman;"&gt;
      &lt;li&gt;If the element's text does &lt;strong&gt;not&lt;/strong&gt;
have
the
property &lt;code&gt;oblique&lt;/code&gt; or &lt;code&gt;italic&lt;/code&gt;,
the currently selected font is retained and the
browser goes to step 4.&lt;/li&gt;
      &lt;li&gt;If the element's text has the property &lt;code&gt;oblique&lt;/code&gt;
or &lt;code&gt;italic&lt;/code&gt;, and the the
font
family contains an oblique or italic font, the font is chosen and then
the browser goes to step 4.&lt;/li&gt;
      &lt;li&gt;If the element's text has the property &lt;code&gt;oblique&lt;/code&gt;
or &lt;code&gt;italic&lt;/code&gt;, and the font family
does &lt;strong&gt;not&lt;/strong&gt;
contain an
oblique or italic font, the normal font is slanted to simulate
oblique/italic text and then the browser goes to step 4.&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code&gt;font-variant&lt;/code&gt; is handled
in this step:
    &lt;ol style="list-style-type: lower-roman;"&gt;
      &lt;li&gt;If the element's text does not have the property &lt;code&gt;small-caps&lt;/code&gt;,
the currently selected font is retained and
the
browser goes to step 5.&lt;code&gt;&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;If the element's text has the property &lt;code&gt;small-caps&lt;/code&gt;,
then the browser looks for a small caps version of the currently
selected font. For example, if the currently selected font is Arial
Italic, the browser looks for Arial Italic Small Caps. This leaves two
possibilities: 
        &lt;ol style="list-style-type: lower-alpha;"&gt;
          &lt;li&gt;The font family does &lt;strong&gt;not&lt;/strong&gt;
contain  a small
caps version of the currently
selected font — the browser then simulates small caps by down
scaling capital
letters of the currently selected font. The browser then goes to step
5.
          &lt;/li&gt;
          &lt;li&gt;The font family contains a small
caps version of the currently
selected font — the browser then selects the small caps
version of the currently selected font. The browser then goes to step 5.&lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;In this step, &lt;code&gt;font-weight&lt;/code&gt; is
checked:
    &lt;ol style="list-style-type: lower-roman;"&gt;
      &lt;li&gt;If the element's text has the font weight property set
to normal, the currently selected font is retained and the browser goes
to step 6.&lt;/li&gt;
      &lt;li&gt;If the element's text has the font weight property set
to anything other than normal, the browser looks for a matching weight
in the font family. For example, if &lt;code&gt;font-weight:
100;&lt;/code&gt; or if &lt;code&gt;font-weight: bold;&lt;/code&gt;,
the browser looks for a font in the font family of weight 100 or 700,
respectively. Therefore, there are two possibilities:
        &lt;ol style="list-style-type: lower-alpha;"&gt;
          &lt;li&gt;The element's text has the font weight set to
lighter than &lt;code&gt;normal&lt;/code&gt; ( &lt;code&gt;100&lt;/code&gt;,&lt;code&gt;200&lt;/code&gt;,
or &lt;span style="font-family: monospace;"&gt;3&lt;/span&gt;&lt;code&gt;00&lt;/code&gt;)
or &lt;code&gt;500&lt;code&gt;&lt;/code&gt;&lt;/code&gt;:
            &lt;ol style="list-style-type: lower-greek;"&gt;
              &lt;li&gt;If the font family contains a version of the
currently selected font of the required weight, the font is selected
and the browser goes to step 6.&lt;/li&gt;
              &lt;li&gt;If the font family does &lt;strong&gt;not&lt;/strong&gt;
contain a version of the currently selected font of
the required weight, the browser chooses the &lt;code&gt;normal&lt;/code&gt;
version of the currently selected font and goes to step 6.&lt;/li&gt;
            &lt;/ol&gt;
          &lt;/li&gt;
          &lt;li&gt;The element's text has the font weight set
to &lt;code&gt;bold&lt;/code&gt; or &lt;code&gt;600&lt;/code&gt;,
            &lt;code&gt;700&lt;/code&gt;, &lt;code&gt;800&lt;/code&gt;
or &lt;code&gt;900&lt;/code&gt;:
            &lt;ol style="list-style-type: lower-greek;"&gt;
              &lt;li&gt;If the font family contains a version of the
currently selected font of the required weight, the font is selected
and the browser goes to step 6.&lt;/li&gt;
              &lt;li&gt;If the font family does &lt;strong&gt;not&lt;/strong&gt;
contain a version of the currently selected font of
the required weight, and if the font-family contains a bold version of
the currently selected font, the browser chooses the &lt;code&gt;bold&lt;/code&gt;
version of the currently selected font and goes to step 6.&lt;/li&gt;
              &lt;li&gt;If the font family does &lt;strong&gt;not&lt;/strong&gt;
contain a version of the currently selected font of
the required weight, and if the font-family does &lt;strong&gt;not&lt;/strong&gt;
contains a bold version of the currently selected font, the browser
simulates&lt;code&gt;&lt;/code&gt; boldface by increasing the stroke
width of the currently selected font and goes to step 6.&lt;/li&gt;
            &lt;/ol&gt;
          &lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;In this step, the selected font is scaled to the required
font size.&lt;/li&gt;
&lt;/ol&gt;
Note 1: If the element contains a glyph that is not found in the first
font family, the browser chooses the next specified font family (if
any) or the browser's default fallback font. The browser then goes
through the entire font matching process &lt;strong&gt;for
that glyph only&lt;/strong&gt;. However, Internet Explorer 6 does not
follow this process, it displays an empty "box" character when a glyph
is not available.
&lt;p&gt;For example, if  Comic Sans MS does not contain a
particular mathematical symbol, then, to display that symbol only, the
browser will use the next specified font in the CSS declaration that
does contain the symbol (say Times New Roman). Therefore, Comic Sans MS
will be used for all the element's text except for the mathematical
symbol, which will use Times New Roman.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2264615378200805267-1721543969269597295?l=destination-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://destination-code.blogspot.com/feeds/1721543969269597295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2264615378200805267&amp;postID=1721543969269597295' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1721543969269597295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2264615378200805267/posts/default/1721543969269597295'/><link rel='alternate' type='text/html' href='http://destination-code.blogspot.com/2009/08/font-matching-process.html' title='The Font Matching Process'/><author><name>Chetan Crasta</name><uri>http://www.blogger.com/profile/14826974835809306712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/__ZdUHId0XUA/SQSRShnmSCI/AAAAAAAAAI8/CpAwXFervm4/S220/DSC_0024.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2264615378200805267.post-611308082123208416</id><published>2009-08-05T19:52:00.003+05:30</published><updated>2010-09-02T01:04:25.118+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>The @font-face at-rule</title><content type='html'>&lt;p&gt;The &lt;code&gt;@font-face&lt;/code&gt; rule can be used for
a number of things:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Fonts that are not commonly provided by operating systems
can be used on a webpage. The font files are downloaded by the browser
when the page is loaded.&lt;/li&gt;
  &lt;li&gt;Can be used to give simpler names to operating system fonts&lt;/li&gt;
  &lt;li&gt;Operating system font-family names can be re-assigned to
downloadable font files.&lt;/li&gt;
  &lt;li&gt;Multiple font locations can be specified. Therefore, if a
particular font is not provided by the viewer's operating system, only
then will the browser download the font from the server.&lt;/li&gt;
  &lt;li&gt;Complete font-families containing a boldface font, an
oblique/italic font, and multiple weights can be created using
@font-face.&lt;/li&gt;
  &lt;li&gt;Special downoladable fonts such as light or oblique/italic
can be specified for operating system font-families.&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;General Syntax&lt;/h5&gt;
&lt;p&gt;The general syntax of an &lt;code&gt;@font-face&lt;/code&gt;
rule is:&lt;br /&gt;
&lt;code&gt;@font-face { descriptor: value }&lt;/code&gt;&lt;br /&gt;
Here is an example of an &lt;code&gt;@font-face&lt;/code&gt;
rule:&lt;br /&gt;
&lt;code&gt;font-face { &lt;br /&gt;
  font-family: Example;&lt;br /&gt;
  src: url(http://www.example.com/example.ttf)&lt;br /&gt;
}&lt;/code&gt;&lt;br /&gt;
In the example, &lt;code&gt;font-family&lt;/code&gt; and &lt;code&gt;src&lt;/code&gt;
are &lt;dfn&gt;descriptors&lt;/dfn&gt; and &lt;code&gt;Example&lt;/code&gt;
and &lt;code&gt;url(http:/www.example.com/example.ttf)&lt;/code&gt;
are &lt;dfn&gt;values&lt;/dfn&gt;. The &lt;code&gt;descriptor&lt;/code&gt;,
the &lt;code&gt;colon&lt;/code&gt; and the
&lt;code&gt;value&lt;/code&gt; together are called  &lt;dfn&gt;font-descriptors&lt;/dfn&gt;.&lt;/p&gt;
&lt;h4&gt;The font-family Descriptor&lt;/h4&gt;
&lt;p&gt;Every &lt;code&gt;@font-face&lt;/code&gt; rule must have
the &lt;code&gt;font-family&lt;/code&gt;
descriptor.
The &lt;code&gt;font-family&lt;/code&gt; descriptor's value
specifies
the name of the font family for which the subsequent &lt;code&gt;font
descriptions&lt;/code&gt;
apply. The value of &lt;code&gt;font-family&lt;/code&gt; can
also be the name of an operating system font family, in which
case the &lt;code&gt;font description&lt;/code&gt; will
override the default properties of the font family.&lt;/p&gt;
Here is an example of the &lt;code&gt;font-family&lt;/code&gt;
descriptor:&lt;br /&gt;
&lt;p&gt;&lt;code&gt;font-family: "Example Modern";&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;The src Descriptor&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;src&lt;/code&gt; descriptor indicates the
location of the font file associated with the font family name and,
optionally, a &lt;code&gt;format hint&lt;/code&gt; of the font file.
The location of the file can be indicated by a URL or, if the font is
provided by the operating system, by the font family name. ;
An &lt;code&gt;@font-face&lt;/code&gt; rule can have only one &lt;code&gt;src&lt;/code&gt;
font-descriptor.&lt;/p&gt;
&lt;p&gt;In an &lt;code&gt;@font-face&lt;/code&gt; rule, the value of
the &lt;code&gt;src&lt;/code&gt; font descriptor can be a comma
separated list of sources. If the font file
cannot be found at the first
location, the browser will try the second location.&lt;/p&gt;
&lt;p&gt;Here is an example of the &lt;code&gt;src&lt;/code&gt;
font descriptor with only one location specified:&lt;br /&gt;
&lt;code&gt;@font-face {&lt;br /&gt;
  font-family: "Example Modern";&lt;br /&gt;
  src:
url(http://www.example.com/example.ttf) format("truetype")&lt;br /&gt;
 }&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;src&lt;/code&gt; descriptor can also point to
a "local" font. A &lt;dfn&gt;local font&lt;/dfn&gt; is the name of a
font that is provided by the operating system. &lt;/p&gt;
&lt;p&gt;Here is another example with two locations specified:&lt;br /&gt;
&lt;code&gt;@font-face { &lt;br /&gt;
  font-family: "Example 1";&lt;br /&gt;
  src: local("Example 1"),
url(http://www.example.com/example_1.otf)&lt;br /&gt;
  }&lt;/code&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h5&gt;Format Hints&lt;/h5&gt;
&lt;p&gt;The &lt;dfn&gt;format hint&lt;/dfn&gt; consists of the word &lt;code&gt;format&lt;/code&gt;
followed by the font file format name in quotes, inside
parentheses. The whole expression appears at the end of a &lt;code&gt;url&lt;/code&gt;
location in the &lt;code&gt;src&lt;/code&gt; font-descriptor.&lt;br /&gt;
The &lt;code&gt;format
hint&lt;/code&gt; will tell the browser what format the font file
specified in &lt;code&gt;url&lt;/code&gt; is. Based on that
information, the browser can avoid downloading
unsupported font files.&lt;/p&gt;
&lt;p&gt; Here is a table of currently defined format hints:&lt;/p&gt;
&lt;table border="1"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
    &lt;th&gt;Format Hint&lt;/th&gt;
    &lt;th&gt;Font Format&lt;/th&gt;
    &lt;th&gt;File extensions&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;"truetype"&lt;/td&gt;
      &lt;td&gt;TrueType&lt;/td&gt;
      &lt;td&gt;.ttf&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;"opentype"&lt;/td&gt;
      &lt;td&gt;OpenType&lt;/td&gt;
      &lt;td&gt;.ttf, .otf&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;"truetype-aat"&lt;/td&gt;
      &lt;td&gt;TrueType with Apple Advanced Typography extensions&lt;/td&gt;
      &lt;td&gt;.ttf&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;"embedded-opentype"&lt;/td&gt;
      &lt;td&gt;Embedded OpenType&lt;/td&gt;
      &lt;td&gt;.eot&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;"svg"&lt;/td&gt;
      &lt;td&gt;SVG Font&lt;/td&gt;
      &lt;td&gt;.svg, .svgz&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The format hints &lt;code&gt;"truetype"&lt;/code&gt;
and &lt;code&gt;"opentype"&lt;/code&gt; are considered equivalent to
each other.&lt;/p&gt;
&lt;hr /&gt;
&lt;h4&gt;Embedded OpenType (eot)&lt;/h4&gt;
Internet Explorer 6, 7 and 8 only support embedding of fonts in
Microsoft's Embedded OpenType (eot) format. Eot files are not
supported by other browsers. Eot files can be created
from font files that have the &lt;code&gt;ttf&lt;/code&gt;
extension. Therefore, eot files can be created only from TrueType font
files and OpenType TT font files, not
OpenType PS (&lt;code&gt;.otf&lt;/code&gt;) files. The open
source application &lt;a href="http://fontforge.sourceforge.net/"&gt;fontforge&lt;/a&gt;
can be used to convert otf fonts to ttf in order to convert
them to eot.
&lt;p&gt;Eot files are compressed and also allow restricted
access — 
a &lt;code&gt;root&lt;/code&gt; url is specified when creating
the eot file and the browser will only load the eot file from html
p
