Common XHTML validation error

Related Tags:

  Common XHTML Validation error 

  Original: http://www.blackwidows.org.uk/resources/tutorials/xhtml/common-errors.html 

  Without coding and symbols ("&") 

  Example: 
  <a Href="foo.cgi?chapter=1&section=2"> ...</ a> 

  Could lead to verify reports: unknown entity ... 

  Solution: Always & & alternative. 

  Correct grammar: 
  <a Href="foo.cgi?chapter=1&section=2"> ...</ a> 

  Wrong nested elements 

  Example: 
  <strong> <em> ...</ Strong> </ em> 

  Could lead to verify reports: loss of </ em> Tags 

  Solution: XHTML in all the elements must be in accordance with its open closure order to the contrary. 

  Correct grammar: 
  <strong> <em> ...</ Em> </ strong> 

  Lowercase the DOCTYPE 

  Example: 
  <! Doctype html public "- / / w3c / / dtd xhtml 1.0 strict / / en" 
  "Http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> 

  Could lead to verify reports: lost DOCTYPE 

  Solution: DOCTYPE case sensitive, please use the correct spelling manner. 

  Correct grammar:: 
  <DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" 
  "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

  Close loss "/" 

  Example: 
  <img Src="image.gif" width="100" height="100" alt="Logo"> 

  Could lead to verify reports: lost Close Tags 

  Solution: often referred to as "empty element", for example, img, and must add a space followed by a slash "/." 
  See XHTML Elements to view a complete list. 

  Correct grammar:: 
  <img Src="image.gif" width="100" height="100" alt="Logo" /> 

  Uppercase labels 

  Example: 
  <STRONG> <EM> ...</ EM> </ STRONG> 

  Could lead to verify reports: there was no specific Element ... 

  Solution: for all HTML elements and attributes names to use lowercase.    This is necessary because XML is case-sensitive.    For example, <em EM> and <> is different labels. 

  Correct grammar:: 
  <strong> <em> ...</ Em> </ strong> 

  No use enclosed in quotation marks attribute value 

  Example: 
  <td Rowspan=3> 

  Could lead to verify the report: the lack of "" 

  Solution: all the attribute value must be included, including those who appear to be digital value. 

  Correct grammar:: 
  <td Rowspan="3"> 


  The translator continued: 

  XHTML Strict documents used in the performance of certain tags or attributes 

  Example: 
  <a Href="#" target="_blank"> 

  Could lead to verify reports: this version of the HTML in the absence of the attributes 

  Solution: strict compliance with the definition of DTD writing code, or other documentation for your choice of an appropriate DOCTYPE.    Javascript can also + DOM to achieve certain results. 

  Correct grammar:: 
  <a Href="#" onclick="window.open(this.href);return false"> 




Related articles:

And the secret of meta tags
  META tags, HTML is the language head an auxiliary label.    In almost all of the page, we can see that this html code similar to the following:  ---------------------------- <head>   <meta Http-equiv="Content-Type" content="text/html; charset=gb2...
Establishment of the basic knowledge: DNS on incomplete summary
  A few years ago first contact with the Active Directory, it is the leaders of the Active Directory deployment time.    Although the hand and several books, but the time constraint does not have enough time for careful study.    Edge to Edge run dcpromo watch on the activit...
Flash AS achieve by drawing on the detailed
  Using Action Script control, a random draw all kinds of graphics, the tutorial for the lecture series, offers a number of very useful AS code……    Method of Use: copies of the code you can see results in frame    Arbitrary use the mouse to draw a line    Effec...
Heavyweight (CSS) Cascading Style Sheets Guide (to)
  Heavyweight (CSS) Cascading Style Sheets Guide I    This paper is an overview on the application of CSS, and provides some examples to demonstrate how the work of the CSS is to facilitate the more effective your learning CSS.    This is not a reference or guide to the c...
Dynamic changes in the CSS asp.net
  In asp.net, some time to transform dynamic CSS, for example, sometimes do personalized pages, we can do so  <head>   <link Id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" />    </ Head>  &...