Your SlideShare is downloading. ×
Xhtml
Xhtml
Xhtml
Xhtml
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Xhtml

187

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
187
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. XHTMLXHTML (eXtensible HyperText Markup Language) is a family of XML markuplanguages that mirror or extend versions of the widely-used Hypertext Markup Language(HTML), the language in which web pages are written.The Most Important Differences from HTML: XHTML elements must be properly nested XHTML elements must always be closed XHTML elements must be in lowercase XHTML documents must have one root element In HTML, some elements can be improperly nested within each other, like this: <b><i>This text is bold and italic</b></i> In XHTML, all elements must be properly nested within each other, like this: <b><i>This text is bold and italic</i></b>XHTML Elements Must Always Be ClosedNon-empty elements must have a closing tag.This is wrong:<p>This is a paragraph<p>This is another paragraphThis is correct:<p>This is a paragraph</p><p>This is another paragraph</p>Empty Elements Must Also Be ClosedEmpty elements must also be closed.This is wrong:
  • 2. A break: <br>A horizontal rule: <hr>An image: <img src="happy.gif" alt="Happy face">This is correct:A break: <br />A horizontal rule: <hr />An image: <img src="happy.gif" alt="Happy face" />XHTML Elements Must Be In Lower CaseTag names and attributes must be in lower case.This is wrong:<BODY><P>This is a paragraph</P></BODY>This is correct:<body><p>This is a paragraph</p></body>XHTML Documents Must Have One Root ElementAll XHTML elements must be nested within the <html> root element. Child elements mustbe in pairs and correctly nested within their parent element.The basic document structure is:<html><head> ... </head><body> ... </body></html>More XHTML Syntax Rules Attribute names must be in lower case Attribute values must be quoted
  • 3. Attribute minimization is forbidden The XHTML DTD defines mandatory elementsAttribute Names Must Be In Lower CaseThis is wrong:<table WIDTH="100%">This is correct:<table width="100%">Attribute Values Must Be QuotedThis is wrong:<table width=100%>This is correct:<table width="100%">Attribute Minimization Is ForbiddenThis is wrong:<input checked><input readonly><input disabled><option selected><frame noresize>This is correct:<input checked="checked" /><input readonly="readonly" />
  • 4. <input disabled="disabled" /><option selected="selected" />The Lang AttributeThe lang attribute applies to almost every XHTML element. It specifies the language of thecontent within an element.If you use the lang attribute in an element, you must also add the xml:lang attribute, like this:<div lang="it" xml:lang="it">Ciao bella!</div>

×