Centering Content

T

Toby Inkster

Neal said:
2) The I Think I Get It But I Really Don't Period - I am using XHTML for
misguided reasons, but am developing an understanding of semantic markup
and am using CSS for everything appropriate.

There are certainly advantages in using XHTML.

e.g. XHTML forces you to quote all attributes and explicitly close all
elements, which are considered generally good practice for HTML as well
as XHTML, and generally makes you think a bit more about the tree
structure of the document.

Of course, you can quote all attribute values and close all (non-empty)
elements in HTML too, but if you *do* forget one, then tha validator won't
complain and you'll never know about it... until some silly browser gets
something wrong. (e.g. Netscape 4.x can go ballistic if you leave out the
closing tags for table cells/rows.)

So there are certain advantages to authoring in XHTML.

Of course that's not to say that the markup language used by the author
has to be the same one served to the client, but -- be honest -- in most
cases it is.

Ideally, I'd use a DTD based on HTML 4.01 Strict, but that forced the
quoting of attributes and the closing of non-empty elements. I may write
one some day.
 
S

Spartanicus

Toby Inkster said:
Ideally, I'd use a DTD based on HTML 4.01 Strict, but that forced the
quoting of attributes and the closing of non-empty elements. I may write
one some day.

Editing the existing Strict DTD so that it requires elements to be
closed is easy (took me five minutes). Regarding mandatory quoting of
attributes I haven't managed that, afaics this isn't part of the DTD. If
anyone knows how to do that please share.
 
E

Eric B. Bednarz

Spartanicus said:
Editing the existing Strict DTD so that it requires elements to be
closed is easy (took me five minutes). Regarding mandatory quoting of
attributes I haven't managed that, afaics this isn't part of the DTD. If
anyone knows how to do that please share.

For starters, you will have to have a local validating system to be able
to pass a customized SGML declaration to the parser (theoretically you
could include it in the document entity itself, but let's stop kidding).

Get binaries or source at:

<http://www.jclark.com/sp/howtoget.htm>

Especially if you need to be able to fetch external subsets from virtual
hosts you may prefer to use lq-nsgmls instead:

<http://www.htmlhelp.com/tools/validator/offline/>

Grab the SGML declaration of HTML 4.01 and locate under MINIMIZE

SHORTTAG YES

and replace that with

SHORTTAG
STARTTAG
EMPTY NO
UNCLOSED NO
NETENABL NO
ENDTAG
EMPTY NO
UNCLOSED NO
ATTRIB
DEFAULT YES
OMITNAME NO
VALUE NO



Set up a catalog:


SGMLDECL path/to/custom.decl
DOCTYPE HTML path/to/custom.dtd


If you have (X)Emacs (if not, why not?) adjust the initialisation file
for neat integration with PSGML.
 
N

Neal

There are certainly advantages in using XHTML.

e.g. XHTML forces you to quote all attributes and explicitly close all
elements, which are considered generally good practice for HTML as well
as XHTML, and generally makes you think a bit more about the tree
structure of the document.

Well, that aspect of XHTML has carried to my HTML. I am careful to make my
markup well-formed. I'm much more careful with that than I was in the
Idiot Period.
Of course, you can quote all attribute values and close all (non-empty)
elements in HTML too, but if you *do* forget one, then tha validator
won't
complain and you'll never know about it... until some silly browser gets
something wrong. (e.g. Netscape 4.x can go ballistic if you leave out the
closing tags for table cells/rows.)

But I never forget that! I am pretty meticulous in that regard. Where I
trip up is nested divs. I generally comment after every </div> regarding
which div I'm closing.

</div><!--content-->
Ideally, I'd use a DTD based on HTML 4.01 Strict, but that forced the
quoting of attributes and the closing of non-empty elements. I may write
one some day.

Let me know when you do.
 
S

Spartanicus

Grab the SGML declaration of HTML 4.01 and locate under MINIMIZE

[...]

That did the trick, thanks Eric.

For users of Liam Quinn's ARV ("A Real Validator") these files need to
be modified:

HTML4.dcl and html.soc
 
A

Andy Dingley

no, you're writing html. this is xhtml: <img/> this is html: <img />

I don't understand what your voices are telling you here.

Why can't the OP write some XHTML, and have it as real, genuine XHTML?

Until the sweet little XHTML pages have to go near those nasty rough
browsers out on the council estate interweb, there's no problem with
them really being XHTML. It's not hard to write XHTML either - you
don't need to compromise anything at the authoring step.
 
B

brucie

In alt.html Andy Dingley said:
I don't understand what your voices are telling you here.

"don't forget to get the sunday papers, you know how annoyed we get when
we don't have a tv guide for the week"
Why can't the OP write some XHTML, and have it as real, genuine XHTML?

genuine xhtml is fine. pretend xhtml is not. pretend xhtml is the one i
have issues with. theres no point using pretend xhtml when humans can
just stick to using html.
Until the sweet little XHTML pages have to go near those nasty rough
browsers out on the council estate interweb, there's no problem with
them really being XHTML.

so you stuff around sending html rather then genuine xhtml or use
pretend xhtml. you may as well have stayed with using html in the first
place.
 
L

Lois

Lois wrote:
: > : Hype? You never told me about that. I wanna see the hype.
: >
: > Does anyone else want to tell me about the hype around XHTML?
Think
: > of what will happen to Brucie's head if we talk about it. But
really,
: > I want to know what it's about.

mbstevens responded:
: Well, you should at least do some reading from the mouths of the
horses to
: decide whether you believe it's hype or not; look for XHTML info
on these
: sites:
: http://www.webstandards.org
: http://w3.org
: ...It could take an hour or two, but will be well worth it.

Thanks for the suggestion. I still haven't found that hour or 2, but
I'll find it one of these days.

Lois
 
L

Lois

In alt.html Andy Dingley said:
: > Why can't the OP write some XHTML, and have it as real, genuine
XHTML?

Brucie responded:
: genuine xhtml is fine. pretend xhtml is not. pretend xhtml is the
one i
: have issues with. theres no point using pretend xhtml when humans
can
: just stick to using html.

What's the difference between pretend XHTML and genuine XHTML?

Thanks for all the responses, everyone, but most of the time I didn't
know enough to be able to jump in. I want to write valid code that
works in all browsers from NN4 up. I can do that with HTML
transitional, and I've done it with this one site so far with XHTML
strict. I check all my pages at validator.w3.org and in all the
browsers I have. They work. What advantages and disadvantages will I
have if I use one doctype over another?

Thanks again,
Lois
 
B

brucie

In alt.html Lois said:
What's the difference between pretend XHTML and genuine XHTML?

genuine xhtml hasn't been fiddled with so browsers think its html.
Thanks for all the responses, everyone,

you already know i accept cash and/or sexual favors
but most of the time I didn't know enough to be able to jump in.

just make it up as you go, i do.
I want to write valid code that works in all browsers from NN4 up.

this is where we start another thread on the financial viability and
efforts required to support such and old and broken browser with
anything other than vanilla html.
What advantages and disadvantages will I have if I use one doctype
over another?

http://www.w3.org/International/articles/serving-xhtml/
 
T

Toby Inkster

brucie said:
this is where we start another thread on the financial viability and
efforts required to support such and old and broken browser [NN4] with
anything other than vanilla html.

I can confidently say that my site works in my entire testing suite[1],
apart from those that don't send the HTTP "Host" header.

In some older browsers the XML declaration is displayed, but other than
that, the site is usable and navigable.

____
[1] http://groups.google.com/[email protected]
 
B

brucie

In alt.html Toby Inkster said:
this is where we start another thread on the financial viability and
efforts required to support such and old and broken browser [NN4] with
anything other than vanilla html.
I can confidently say that my site works in my entire testing suite[1],

it may work but it doesn't display correctly in opera7.54. your main
content bit overlaps the left menu thingy bit and has as long as i can
remember.

and now your front page has freaked me out i have to sit in the corner
for 5 minutes and dribble.

STOP LOOKING AT ME!
 
R

Robert Frost-Bridges

brucie wrote:
[...]
it may work but it doesn't display correctly in opera7.54. your main
content bit overlaps the left menu thingy bit and has as long as i can
remember.
[...]

Actually I've always noticed that too in firefox (currently using
1.0PR).
 
T

Toby Inkster

brucie said:
it may work but it doesn't display correctly in opera7.54. your main
content bit overlaps the left menu thingy bit and has as long as i can
remember.

'tis a consequence of the "minimum font" setting in your browser.

I have just this minute thought of a nice workaround though. I'll
implement it in a little while...
 
M

Michael Fesser

.oO(Lois)
What's the difference between pretend XHTML

XHTML delivered as text/html
and genuine XHTML?
application/xhtml+xml

Thanks for all the responses, everyone, but most of the time I didn't
know enough to be able to jump in. I want to write valid code that
works in all browsers from NN4 up. I can do that with HTML
transitional

Why not Strict?
What advantages and disadvantages will I
have if I use one doctype over another?

Sending XHTML as text/html Considered Harmful
http://hixie.ch/advocacy/xhtml

Serving XHTML 1.0
http://www.w3.org/International/articles/serving-xhtml/

Micha
 
L

Lois

In alt.html Lois said:
: > What's the difference between pretend XHTML and genuine XHTML?
:
: genuine xhtml hasn't been fiddled with so browsers think its html.

Fortunately, I may find the answer in the links Michael posted if I
can find time to read those pages.

: you already know i accept cash and/or sexual favors

And you already know how I respond when you say that. You wouldn't
want everyone to respond the same way, would you?

: just make it up as you go, i do.

I'm starting to see where you do that.

: > I want to write valid code that works in all browsers from NN4
up.
:
: this is where we start another thread on the financial viability
and
: efforts required to support such and old and broken browser with
: anything other than vanilla html.

Let's not bother. That's an opinion question, we have different
opinions, and we know what they are. But I'm really surprised that
all your voices are in agreement on this one. I thought the deep,
thoughtful one was different.

: > What advantages and disadvantages will I have if I use one
doctype
: > over another?
:
: http://www.w3.org/International/articles/serving-xhtml/

That looks like too much to take in during a 2-minute skim while I'm
eating dinner. (Such is my life these days.) But I think I'll change
the pages to HTML. I didn't want to hurt the feelings of the designer
who started the site (he has only one voice that I know of), but my
reason is that I don't want to risk messing up the coding later
because I don't really understand XHTML yet. HTML is safer for
someone at my knowledge level. Even the XHTML supporters will
probably agree with that.

Thanks,
Lois
 
L

Lois

:
: I can confidently say that my site works in my entire testing
suite[1],
: apart from those that don't send the HTTP "Host" header.
:
: In some older browsers the XML declaration is displayed, but other
than
: that, the site is usable and navigable.
: ____
: [1]
http://groups.google.com/[email protected]
: --
: Toby A Inkster BSc (Hons) ARCS
: Contact Me ~ http://tobyinkster.co.uk/contact

I'm impressed with your testing suite, but I'm interested in how you
define "works." Your contact page has no formatting in NN4, and the
"Skip to navigation" link goes nowhere. But at least you care enough
about users of numerous browsers to make the effort for them. :)

Lois
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top