xhtml table attributes

N

notbob

I'm completely new to xhtml, so am looking for info. I found a good
tutorial on webpage layout and am trying to follow it, but I think it
uses ancient html as there is no DTD at all visible on the source
page. For a table border, it uses bordercolor="#FF0000", which
renders fine in my Quanta Plus editor. OTOH, it also gives a error
about using it in the built in validator which is set for xhtml 1.0
transitional. So, I look up the xhtml reference page on W3 schools
which idicates xhtml DOES NOT have bordercolor attr, which would seem
to go along with the error I'm getting from my validator. OTOH, when
I go to a Hudson Valley CC website and look at their xhtml reference,
they say xhtml DOES have a bordercolor attr. Who is right and is it
rendering properly cuz it's transitional?

Another question: The website with the layout tutorial on tables says
tables are good are good for beginners, but CSS is better. If I'm
gonna go with xhtml, which seems to be the way to go, would I be
better off forget tables and learn CSS?

nb
 
D

dorayme

notbob said:
Another question: The website with the layout tutorial on tables says
tables are good are good for beginners, but CSS is better. If I'm
gonna go with xhtml, which seems to be the way to go, would I be
better off forget tables and learn CSS?

Go with HTML 4.01 Strict. Separate out the HTML (basically what
you want to say rather than how nice it can look), and then link
a CSS stylesheet to style it all as you wish.

Tables are not opposed to CSS, a table is an HTML element but you
probably mean laying out pages with tables for the visual effect.
That is not a good idea these days.

Now and again you need to use a table (especially if you are a
beginner) for the odd box or set of boxes because it can be very
challenging to do without (though a more expert person *should*).

But in general, use tables where there is a genuine need to
exhibit the relations between information (eg, a list of goods in
relation to a list of prices).

Browse through:

<http://htmldog.com/>

but see if you can resist using anything besides 4.01 Strict for
the moment (unlike them). It is a complicated story which I won't
go into here, there is no real advantage for you to go past 4.01
Strict. But if you do, that is OK if you learn about some
limitations.

Make sure you get on to the idea explained in the tutes about
separating content from style.

<http://htmldog.com/guides/htmladvanced/recap/>
 
B

Beauregard T. Shagnasty

notbob said:
I'm completely new to xhtml, so am looking for info.

Use HTML 4.01 Strict instead.
I found a good tutorial on webpage layout and am trying to follow it,
but I think it uses ancient html as there is no DTD at all visible on
the source page.

...so then it really is _not_ a "good" tutorial. Try this one, and follow
it all except for its use of XHTML.
http://htmldog.com/
<snip bordercolor stuff, use CSS>

Another question: The website with the layout tutorial on tables says
tables are good are good for beginners, but CSS is better.

Tables are good for tabular data .. you know, railroad timetables, name
and address list, stuff like that. Use CSS for all presentation.
Beginner or expert.
If I'm gonna go with xhtml, which seems to be the way to go,

No, I don't think so. The next step from HTML 4.01 is to HTML 5 (but it
is still too young).
would I be better off forget tables and learn CSS?

Yes, except for tables for tabular data.
 
J

Jukka K. Korpela

notbob said:
I'm completely new to xhtml

Then forget about XHTML. There's little if anything to be gained by using
XHTML as opposite to disciplined HTML.
I found a good tutorial on webpage layout

Hardly. The (lack of) URL tells a lot about this.
For a table border, it uses bordercolor="#FF0000"

That tells more than we want to know.
So, I look up the xhtml reference page on W3 schools

Lasciate ogni speranza, voi ch'entrate!
which idicates xhtml DOES NOT have bordercolor attr,

That's correct, by accident.
OTOH, when
I go to a Hudson Valley CC website and look at their xhtml reference,
they say xhtml DOES have a bordercolor attr.

Well, when I checked my community college's website, they say it's OK too,
and they also say that 2 + 2 must be more than 5. So whom should I trust?
Who is right and is it
rendering properly cuz it's transitional?

"Transitional" has nothing to do with this. What is it exactlt that you wish
to achieve? Please do not hesitate to post a URL if you want constructive
help.
Another question: The website with the layout tutorial on tables says
tables are good are good for beginners, but CSS is better.

That's roughly the oppoite of the truth. But why do you care?
If I'm gonna go with xhtml

Who told you to go that way?

Was it the same person who told you about bordercolor (which isn't really
bad as such, such incomplete).
 
N

notbob

Use HTML 4.01 Strict instead.

Both you and dorayme advise to use html 4.01 strict and you both refer
me to http://htmldog.com/, a website that's titled:

"The Best Practice Guide To XHTML and CSS"

......and is coded in "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0....>"

You trying to help me or jes confuse more than I already am? ;)

In fact, I see many webpages done in xhtml, specially one's that
present themselves as authorities on html stds. Why should I eschew
xhtml for html 4.01 strict? I'm dead serious, here, and have spent
the last 3 days trying to make sense of this doctype stds insanity, so
would appreciate a serious answer, please. Thank you.

I like the "dog" website and it gives some good insights. I do
see what you mean by meaning and presantation, so I will learn CSS and
use tables for train schedules only. ;)

nb
 
J

Jonathan N. Little

notbob said:
In fact, I see many webpages done in xhtml, specially one's that
present themselves as authorities on html stds. Why should I eschew
xhtml for html 4.01 strict? I'm dead serious, here, and have spent
the last 3 days trying to make sense of this doctype stds insanity, so
would appreciate a serious answer, please. Thank you.

xhtml held promise, allowed for extended functionality, but since MS
refused to support xhtml, (still don't with their latest browser) then
there is no advantage to using it. Those pages in xhtml are just being
parsed as bad html in IE, so forget xhtml, use html 4.01 strict. Maybe
MS will support html 5.0...<shrug>
 
B

Beauregard T. Shagnasty

notbob said:
Both you and dorayme advise to use html 4.01 strict and you both refer
me to http://htmldog.com/, a website that's titled:

It is the most oft-recommended tutorial... W3Schools is generally
regarded as, um, er .. crap. Lots of errors. Oh, and is not related to
the W3C at all.
"The Best Practice Guide To XHTML and CSS"

.....and is coded in "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0....>"

You trying to help me or jes confuse more than I already am? ;)

Please note that I said,
"Try this one, and follow it all *except for its use of XHTML*.
http://htmldog.com/"

All except the Xhtml.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
In fact, I see many webpages done in xhtml,

Y'know why? Bcuz a lot of WYSIWYG tools default to it ("the latest
whizz-bang dee-ziner must-have!") and the users don't know any different
so they never fix it.
specially one's that present themselves as authorities on html stds.

There are clueless people in all fields. Just a few days ago, I saw a
local ad for a (local) "web design company." I looked at their
portfolio. Absolutely *horrible* work in soooo many ways! I'll not
embarrass them here, and am waiting to see if I get a response to my
polite email.
Why should I eschew xhtml for html 4.01 strict? I'm dead serious,
here, and have spent the last 3 days trying to make sense of this
doctype stds insanity, so would appreciate a serious answer, please.
Thank you.

Ok, go here to this page of mine and run the test. Use IE, then any
other modern browser.
http://tekrider.net/html/doctype.php
It should reaffirm what Jonathan said about Internet Explorer.
I like the "dog" website and it gives some good insights. I do see
what you mean by meaning [_content_] and presantation, so I will learn
CSS and use tables for train schedules only. ;)

...even if we can't convince you to drop Xhtml...

Choices between "tables for layout/CSS" and "HTML/XHTML" are two
different subjects, of course.
 
D

Dylan Parry

notbob said:
Both you and dorayme advise to use html 4.01 strict and you both refer
me to http://htmldog.com/, a website that's titled:

"The Best Practice Guide To XHTML and CSS"

.....and is coded in "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0....>"

XHTML as a spec is dead—the W3C abandoned its working group some time
back. As a syntax, however, XHTML is very much alive in HTML5 as it
allows you to write in either HTML (SGML-style) or XHTML (XML-style)
syntaxes depending on your own preference.

I personally prefer the XHTML syntax as it reminds me to close all
elements and keep tags all lowercase etc.

I'd suggest, as others have done, that you learn HTML 4.01 as a base,
but look into XHTML syntax to see what you prefer, but also keep an eye
on HTML5 as it is definitely the future and in many cases can be used
now (eg. The doctype <!doctype html>). Just don't go down the way of the
dead XHTML 2.0 spec, or allow yourself to stagnate without looking to
future specs.
 
N

notbob

It is the most oft-recommended tutorial... W3Schools is generally
regarded as, um, er .. crap. Lots of errors. Oh, and is not related to
the W3C at all.

Ahh... I did not know that. Thnx for the clarification.
All except the Xhtml.

DOH! Possibly a senior moment.
Y'know why? Bcuz a lot of WYSIWYG tools default to it ("the latest
whizz-bang dee-ziner must-have!") and the users don't know any different
so they never fix it.

I guess it was W3C.org using xhtml that made up my mind, but this
wouldn't be the first time I've changed. I plan on doing all coding
manually, till I understand.
Ok, go here to this page of mine and run the test. Use IE, then any
other modern browser.
http://tekrider.net/html/doctype.php
It should reaffirm what Jonathan said about Internet Explorer.

I'll get back on that. I did run htmldog.com on both a XP w/ IE6 and
my Slackware box w/ Seamonkey. They both rendered the same.
..even if we can't convince you to drop Xhtml...

I'm not made of stone. So far, the "html 4.01 strict" advice has been
unanimous. I'm not against experienced advice or I wouldn't have
asked the question. I started to go with html5, but discovered few
browsers suppport it.
Choices between "tables for layout/CSS" and "HTML/XHTML" are two
different subjects, of course.

I know how to do tables, from my old html 2.0 days (short lived), so
if I'm gonna relearn, can't hurt to learn CSS, too. I'm no code boy,
but am not afraid of jumping in. I want to do this right and prefer
learning the right way, not the shortcuts.

Thank you for your advice.

nb
 
N

notbob

XHTML as a spec is dead???the W3C abandoned its working group some time
back. As a syntax, however, XHTML is very much alive in HTML5 as it
allows you to write in either HTML (SGML-style) or XHTML (XML-style)
syntaxes depending on your own preference.

I personally prefer the XHTML syntax as it reminds me to close all
elements and keep tags all lowercase etc.

I'd suggest, as others have done, that you learn HTML 4.01 as a base,
but look into XHTML syntax to see what you prefer, but also keep an eye
on HTML5 as it is definitely the future and in many cases can be used
now (eg. The doctype <!doctype html>). Just don't go down the way of the
dead XHTML 2.0 spec, or allow yourself to stagnate without looking to
future specs.

Good points, all.

It's pretty obvious the whole mess in still in flux and nobody has
settled on much of anything. This will be the fifth day I've been
researching this one single issue and am still confused as ever. I
guess I'll go with 4.01 and keep my ear to the ground. I jes wanna
get started learning the damn code, not trying to make a choice. I'm
so clueless on the whole website thing, I figure it'll take me all
Winter to jest get something up. No problem. I'm retired and got
nothing better to do. Besides, I got the whole LAMP thing on my
plate, too. That should keep me out of trouble.

Now, if anyone can point me to a good basic website how-to ....using
html 4.01 and CSS!.... I'd appreciate it. ;)

Thank you all for the much needed advice. I guess alt.html is not so
dead, after all.

nb
 
R

Rob W.

Op 12-12-2010 15:24, notbob schreef:
XHTML as a spec is dead [....]. As a syntax, however, XHTML is very much alive in HTML5 [...].

This is going to be pretty confusing for the not so very well initiated



This is something I read a lot and I'm not impressed.
What's wrong with you that you continually have to be reminded to close
elements?
You're smart enough to use a markup language but you keep forgetting to
use some pretty basic best-practices. That's very odd.

Do you also keep forgetting to close the door when you drive away in
your car? (some cars will drive with open doors)

Good points, all.

It's pretty obvious the whole mess in still in flux and nobody has
settled on much of anything. This will be the fifth day I've been
researching this one single issue and am still confused as ever.


Don't be.
You've already shown gratitude for the good advise you've gotten. So
stick with it. Go for HTML 4.01
 
B

Beauregard T. Shagnasty

notbob said:
Ahh... I did not know that. Thnx for the clarification.


DOH! Possibly a senior moment.


I guess it was W3C.org using xhtml that made up my mind,

http://www.w3.org/ ... Do note that even they are cheating in their
page generation. They are claiming the XHTML doctype, but are actually
transmitting the pages as:

Content-Type: text/html; charset=utf-8 <-- HTML, not XHTML

rather than the correct:

Content-Type: application/xhtml+xml; charset=utf-8

Of course, if they didn't cheat, everyone using IE would not be able to
read their web site. (My test page listed below)

Note that their pages about HTML 4.01 use that doctype instead of XHTML.
but this wouldn't be the first time I've changed. I plan on doing all
coding manually, till I understand.

And that way you will learn!
I'll get back on that. I did run htmldog.com on both a XP w/ IE6 and
my Slackware box w/ Seamonkey. They both rendered the same.

...because they too are cheating! (see above)
I'm not made of stone. So far, the "html 4.01 strict" advice has been
unanimous. I'm not against experienced advice or I wouldn't have
asked the question. I started to go with html5, but discovered few
browsers suppport it.


I know how to do tables, from my old html 2.0 days (short lived), so
if I'm gonna relearn, can't hurt to learn CSS, too. I'm no code boy,
but am not afraid of jumping in. I want to do this right and prefer
learning the right way, not the shortcuts.

It is sooo much easier using an external style sheet for presentation.
Change one file, changes entire web site. Use inline styles or in-page
style blocks only for one-off styling on a single page only.
Thank you for your advice.

YW.
 
B

Beauregard T. Shagnasty

notbob said:
Now, if anyone can point me to a good basic website how-to ....using
html 4.01 and CSS!.... I'd appreciate it. ;)

http://htmldog.com/ <rof'l>

Just use the HTML 4.01 Strict doctype, and don't use those slashes when
closing elements. These: />
^
Now if you were asking about *design and layout* how-tos that's a whole
different ballgame. Design is in the eye of the beholder - and the
client if you're working for someone else. If the client wants and
insists on flashing red and green banners, you do it. Otherwise, you
create with good taste.

Speaking of design and layout, there's always the ZenGarden example.
http://www.csszengarden.com/
Same content, different style sheets. Pick from the menu on the right.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Dylan Parry
It might be best practice, but it's not invalid to forget to close
elements in HTML, but it is in XHTML, so a validator will pick up on
such errors and warn about them. An incorrectly nested element could
easily be the cause of a problem if you don't notice it—and late- night
coding can often cause such issues.

And modern browsers like Firefox and Opera will refuse to render that
page - IMO, great for testing.
I don't drive, so probably would :p

Be sure not to sit on the left side of the car when the driver is turning
left - you'll fall out. I did.
 
C

cwdjrxyz

http://www.w3.org/...  Do note that even they are cheating in their
page generation. They are claiming the XHTML doctype, but are actually
transmitting the pages as:

   Content-Type: text/html; charset=utf-8      <-- HTML, not XHTML

rather than the correct:

   Content-Type: application/xhtml+xml; charset=utf-8

Of course, if they didn't cheat, everyone using IE would not be able to
read their web site. (My test page listed below)

Note that their pages about HTML 4.01 use that doctype instead of XHTML.

The fairly new IE9 beta browser finally will handle xhtml served
properly as application/xhtml+xml, although I have found a bug or two.
Also IE9 beta will now handle much more xhtm5 including the video and
audio elements which are of much interest to some. However many IE8,7,
and even 6 browsers are still being used. Moreover, IE9 can be
installed only on Windows 7 and Vista OSs, and many XP OSs still are
being used. For these reasons, you likely will have to consider older
IE browsers for many more years. For these older IE browsers to view
an xhtml page properly served as application/xhtml+xml,some trick,
such as using a php insert to convert the xhtml page to a html page,
must be used if the header exchange dialogue does not indicate that
the viewing browser can handle the mime type application/xhtml+xml.
 
B

Beauregard T. Shagnasty

cwdjrxyz said:
The fairly new IE9 beta browser finally will handle xhtml served
properly as application/xhtml+xml, although I have found a bug or two.

Begs the response: "It's about time!!"
Also IE9 beta will now handle much more xhtm5 including the video and
audio elements which are of much interest to some. However many IE8,7,
and even 6 browsers are still being used. Moreover, IE9 can be
installed only on Windows 7 and Vista OSs, and many XP OSs still are
being used. For these reasons, you likely will have to consider older
IE browsers for many more years. For these older IE browsers to view
an xhtml page properly served as application/xhtml+xml,some trick,
such as using a php insert to convert the xhtml page to a html page,
must be used if the header exchange dialogue does not indicate that
the viewing browser can handle the mime type application/xhtml+xml.

I suspect the percentage of web authors who go for that amount of
sophistication will be a rather small number, eh?

One of my commercial sites this month has over half its hits from XP, a
fair smattering from Win9x, various Windows 200N, Windows NT, and even a
few stragglers from Windows 3.xx! Also, all versions of IE from 5.0 up
- but only 0.1% from IE9 so far.
 
N

Neil Gould

Beauregard said:
Begs the response: "It's about time!!"
Hmm... my response is "too little too late."
One of my commercial sites this month has over half its hits from XP,
a fair smattering from Win9x, various Windows 200N, Windows NT, and
even a few stragglers from Windows 3.xx! Also, all versions of IE
from 5.0 up - but only 0.1% from IE9 so far.
By the time IE9 accounts for a large enough portion of the market to matter,
XHTML will likely be quite dead.
 
M

mcnewsxp

Go with HTML 4.01 Strict.

may i ask what supports this assertion? i read thru some of the other
replies. is it mainly because microsoft does not support xhtml? the
company i work uses xhtml transitional. goofy little things like closed
short tags throw an error whne i switch to 4.0 strict.
what arguemnt should i use when trying to convince my colleagues that 4.01
strict is the smartest choice?
thanks,
mike
 
D

dorayme

Go with HTML 4.01 Strict.

may i ask what supports this assertion? i read thru some of the other
replies. is it mainly because microsoft does not support xhtml? the
company i work uses xhtml transitional. goofy little things like closed
short tags throw an error whne i switch to 4.0 strict.
what arguemnt should i use when trying to convince my colleagues that 4.01
strict is the smartest choice?
thanks,
mike[/QUOTE]

In your average world situation where you have colleagues that
need to be convinced for you to do something yourself, don't! Go
with the trendy but otherwise fairly pointless XHTML and just do
it right and serve it as HTML and get it valid and no bad things
will happen to you and you will save yourself a lot of grief.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top