Should I Use HTML or XHTML?

When creating web pages, a big question arises. “Should I use HTML or XHTML?”. Sometimes it’s not even as easy as choosing one over the other. You’re confronted with different DTD (Document Type Description) versions and Loose, Transitional or Strict types.

The most important differences:

  • 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 strict XHTML, all inline elements must be contained in a block element
  • XHTML is XSL ready

List of Doctypes lifted from W3C

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

AutisticCuckoo from the Sitepoint forums claims that XHTML is not good to use for webpages because IE and other browsers doesn’t support it. But why does our XHTML pages work on IE?

Resources

No comments yet.

Leave a Reply

  • freida pinto boyfriend
  • search xml file
  • la ink 2011 season 5
  • new england patriots 84
  • randy moss football cards
  • bea luna
  • chicago bears zip hoodie
  • tea party for kids
  • search engines other than google
  • search engines compared
  • sitcoms
  • search comcast net
  • zara phillips yachtzara phillips zimbio
  • search and seizure
  • wrestling
  • connecticut post
  • chicago bears posters
  • zara phillips baby
  • mtv 90s music videos
  • zara phillips and the queen
  • tea party young people
  • randy moss university
  • connecticut limo
  • kill
  • search engines of the world
  • chicago bears garter
  • search operatorssearch people
  • greg olsen twitter
  • battleship kirishima
  • connecticut lottery
  • greg olsen 2009 calendar
  • mtv music awards
  • search engines internet
  • stewart
  • hp support error 1005
  • chicago bears pictures
  • arrested
  • battleship aurora
  • connecticut quarter error
  • zara phillips school
  • search engines for jobs
  • hp support id
  • la ink bam margera
  • search engines before google
  • halo
  • la ink price list
  • wharehouse
  • dis x
  • hp support contact number
  • vince young 2008
  • dis boards cruise
  • greg olsen university of miami
  • vince young uncle rico
  • new england patriots needs
  • quarters
  • rinse
  • cspan michelle bachmann
  • dis windsor wi
  • battleship classes
  • moble
  • ncaa
  • c span yesterdayc span zelaya
  • tea party ribbons
  • dedham
  • tea party gifts
  • vince young depression
  • bea binene
  • chad ochocinco xpchad ochocinco youtube
  • bengals 08 schedule
  • tea party texas
  • hp support center
  • manicure
  • new england patriots espn blog
  • ipods
  • revival
  • new england patriots gillette stadium
  • zara phillips guest list
  • johanson
  • search 50 cent
  • chicago bears 96
  • hp support center
  • randy moss legal issues
  • search in vi
  • winnipeg
  • new england patriots helmet
  • jenkins
  • bea taylor
  • greg olsen mormon
  • hp support englandhp support forum
  • search engines for kids
  • dis unplugged show notes
  • charges
  • di's hallmark
  • tuneup
  • bengals kids jersey
  • connecticut department of labor
  • freida pinto glamour 2011
  • patten
  • c span yesterdayc span zelaya
  • prediction
  • chad ochocinco sisterchad ochocinco twitter
  • battleship history
  • tea party zombies download
  • disloyaldis magazine
  • christians
  • battleship egg hunt
  • hp support driver downloads
  • la ink watch online free
  • bixby
  • scopes
  • search protocol host
  • vince young z
  • parade
  • charities
  • kayak
  • badges
  • new england patriots 3 4
  • bengals hard knocks episode 1
  • mtv rivals
  • samba
  • zara phillips husband
  • bedspread
  • mtv 25 lame
  • battleship yamato wreck
  • holster
  • tumbling
  • connecticut natural gas
  • randy moss mix
  • bea rims
  • bengals undraftedbengals vs steelers
  • bea 71 16
  • avondale
  • greg olsen dustin keller
  • search dog foundation
  • attempt
  • brownie
  • cspan streaming
  • battleship excel
  • chicago bears bleacher report
  • bengals tryouts
  • hp support contact us
  • chad ochocinco bears
  • flames
  • la ink upcoming episodes
  • battleship galactica
  • mtv overdrive
  • connecticut 5 star resorts
  • connecticut education
  • bea 2011 map
  • zara phillips dating
  • hp support greece
  • hp support greece
  • battleship aurora
  • vince young yahoo stats
  • thom
  • la ink youtube pixie
  • la ink corey
  • battleship lexington
  • mounts
  • 4pm cspancspan area 51cspan 90.1
  • tea party zombies download
  • new england patriots 1997 roster
  • chicago bears schedule 2011
  • randy moss height
  • randy moss wallpaper
  • c span 4 to 5
  • pans
  • connecticut airports
  • tea party medicare
  • greg olsen vancouver
  • zara phillips royal wedding picture
  • new england patriots xxl
  • roth
  • battleship layout
  • bengals images
  • search jail inmates
  • mtv jams
  • dis pater
  • chad ochocinco 15
  • chad ochocinco and cheryl burke
  • graphs
  • goldfinger
  • disassembledis boards
  • new england patriots 1996 roster
  • search engines rankings 2011
  • tyson
  • affairs
  • certified
  • chicago bears media relations