• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

H1 Tags in XHTML verses HTML

 
Steve Dyke
Ranch Hand
Posts: 1621
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have changed the DOCTYPE in my app from HTML to XHTML. Now H1 tags that I modified using CSS do not appear to styled by the CSS definition. The documentation states that there are no differences in the H1 tags between HTML and XHTML.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should not make a difference unless the browser is now fixing invalid markup in a different way.

Can you give a snipplet of code?


Eric
 
Steve Dyke
Ranch Hand
Posts: 1621
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:It should not make a difference unless the browser is now fixing invalid markup in a different way.

Can you give a snipplet of code?


Eric


I found the issue was with the CSS property: font-size. Seems that DOCTYPE HTML 4.1 did not require the unit sufix but DOCTYPE XHTML 1.0 does. Example: 12px, 12 worked in HTML

Now I am having trouble with the hr tag. The CSS has color: red; property but the page displays the hr tag but no color.

page code:



CSS code:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Dyke wrote:I have changed the DOCTYPE in my app from HTML to XHTML

Kinda backwards. XHTML is dead. if you're going to change your page, make it HTML5.
 
Steve Dyke
Ranch Hand
Posts: 1621
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Steve Dyke wrote:I have changed the DOCTYPE in my app from HTML to XHTML

Kinda backwards. XHTML is dead. if you're going to change your page, make it HTML5.


This all started when I desired to use a fancy confirm dialog box with yes and no options. I found a fastConfirm jquery solution but it will not work properly with DOCTYPE set to HTML 4.1.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try it with HTML5. If it doesn't work, find a better plugin. I'd be very wary of a plugin that makes you change your doctype.

XHTML is a dinosaur.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic