You are not logged in.

#1 2008-11-04 00:36:03

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

HTML 4.01 or XHTML 1.0?

I was helping my fiancee make a webpage, and we wanted it to be centered in the browser. I did a quick google and found an answer that would work for XHTML, but not for HTML. If I switched it over to XHTML, would I encounter many difficulties and would the page be compatible with FF, Opera, IE6, and IE7?

Is XHTML too fancy for some old lady's browser?

Offline

#2 2008-11-04 00:48:01

FLCLFan
Member
Registered: 2008-07-21
Posts: 76
Website

Re: HTML 4.01 or XHTML 1.0?

By using XHTML you will encounter less difficulties with the browsers. Take it from a freelance web coder wink

Offline

#3 2008-11-04 01:18:26

reanimator
Member
From: Newton, WI
Registered: 2008-11-03
Posts: 4
Website

Re: HTML 4.01 or XHTML 1.0?

XHTML is more standardized I believe, but its also more picky if you miss things.

Offline

#4 2008-11-04 01:31:10

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: HTML 4.01 or XHTML 1.0?

Thank you for the answers, guys.

Now, just one more. Let's assume that I've written my webpage correctly. If I switch to XHTML, will my page work right without any changes on my part?

Offline

#5 2008-11-04 02:02:06

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: HTML 4.01 or XHTML 1.0?

XHTML is almost identical to HTML 4.01. Any valid XHTML you write will also be valid HTML 4.01, but NOT vice versa. This means some things that are allowed in HTML are not allowed in XHTML.

If you write valid XHTML strict  it should render correctly on most browsers. Have a look here for info and tutorial:

http://www.w3schools.com/xhtml/xhtml_intro.asp

Offline

#6 2008-11-04 12:27:57

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: HTML 4.01 or XHTML 1.0?

.

Last edited by fumbles (2020-09-26 12:14:11)

Offline

#7 2008-11-04 20:09:07

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: HTML 4.01 or XHTML 1.0?

pogeymanz wrote:

we wanted it to be centered in the browser. I did a quick google and found an answer that would work for XHTML, but not for HTML.

The mark-up language is not the issue, you just need to use a strict doctype.

Dusty wrote:

Any valid XHTML you write will also be valid HTML 4.01

This is not true, browser vendors have tag soup parsers and dropped (or never implemented) some HTML features so they can cope with all the XHTML that is served as HTML on the web today. While it is possible to be valid for both, you'd have a hard time finding many pages/sites.

Last edited by N30N (2008-11-04 20:22:28)

Offline

#8 2008-11-04 22:28:04

coarseSand
Member
From: Ottawa, Canada
Registered: 2008-02-11
Posts: 203

Re: HTML 4.01 or XHTML 1.0?

The real question is HTMl 5.0 or XHTML 2.0?


vim? EMACS? Pssh, I code in Scribus.

Offline

Board footer

Powered by FluxBB