Where is the error?

D

dorayme

richard said:
http://1littleworld.net/sample/A1960.html

The validator says I have an error in the CSS,

What validator says this? There are warnings about colour and
backgrounds...

but I'll be damned if I can
find it.
Even my editor shows something wrong, but won't pinpoint it.
Most likely a simple syntax error.

No title maybe? You seem to have character data *between* cells.

<td></td>-<td>67</td>... see the dash?

You write <br> as <br >
 
A

Adrienne Boswell

http://1littleworld.net/sample/A1960.html

The validator says I have an error in the CSS, but I'll be damned if I
can find it.
Even my editor shows something wrong, but won't pinpoint it.
Most likely a simple syntax error.

You've got HTML errors, too.
1. There is no TITLE element in the HEAD section - it's a required
element. Since the validator does not see the HEAD element as being
closed, this may be why your CSS is not behaving.
2. There is no attribute WIDTH for the TD element - use CSS instead
3. As dorayme says, you have </td>-<td>, which is not allowed.

On the CSS side, on line 60, you are using shorthand for the font
property but are not using a size, shorthand would be - font:Arial 100%
See [http://www.w3.org/TR/CSS21/fonts.html#font-shorthand] for more
information.

On line 86 it is also complaining about display:inline-block, but I'm not
sure why. It is almost as if the property is there twice, but I don't
see it in the source.

HTH
 
J

Jonathan N. Little

richard said:
http://1littleworld.net/sample/A1960.html

The validator says I have an error in the CSS, but I'll be damned if I can
find it.
Even my editor shows something wrong, but won't pinpoint it.
Most likely a simple syntax error.


<http://jigsaw.w3.org/css-validator/...uri=http://1littleworld.net/sample/A1960.html>

It gives you the line number, the class name and the string where the
error is located and the error! What more?

Value Error : font Tahoma is not a font-size value : Tahoma,"Lucida
Grande","Trebuchet MS",Helvetica,sans-serif Tahoma,"Lucida
Grande","Trebuchet MS",Helvetica,sans-serif

With the property shortcut "font" there is a required combination of
properties which you are not satisfying. You are only specifying the
"font-family". Change the rule to:

font-family: Tahoma, "Lucida Grande", "Trebuchet MS", Helvetica, sans-serif;

will fix the error.
 
R

richard

<http://jigsaw.w3.org/css-validator/...uri=http://1littleworld.net/sample/A1960.html>

It gives you the line number, the class name and the string where the
error is located and the error! What more?

Value Error : font Tahoma is not a font-size value : Tahoma,"Lucida
Grande","Trebuchet MS",Helvetica,sans-serif Tahoma,"Lucida
Grande","Trebuchet MS",Helvetica,sans-serif

With the property shortcut "font" there is a required combination of
properties which you are not satisfying. You are only specifying the
"font-family". Change the rule to:

font-family: Tahoma, "Lucida Grande", "Trebuchet MS", Helvetica, sans-serif;

will fix the error.

I did just that.
The problem with the "head" error seemed to be the fact there was no title
tag.
I put the tags in, my editor was happy and so was the validator.
 
T

Tim Streater

richard said:
I did just that.
The problem with the "head" error seemed to be the fact there was no title
tag.
I put the tags in, my editor was happy and so was the validator.

I would say you should check things a little more before giving up. I
mean, leaving out <title> shouldn't make the page appear incorrectly in
the browser, but it's easy enough to look up font and see what's
required. Or the other things in your css.

Come on Sherlock, you can do better than this.
 
R

richard

I would say you should check things a little more before giving up. I
mean, leaving out <title> shouldn't make the page appear incorrectly in
the browser, but it's easy enough to look up font and see what's
required. Or the other things in your css.

Come on Sherlock, you can do better than this.

Why is it us little guys give a shit about code and the big guys could care
less?
Just for fun I plugged in msnbc.com into the validator.
33 warnings
245 errors.
Then you have the full blown google page.
84 warnings
187 errors.

The big guys obviously rely on the browser to fix their errors.
But hey, if it works, what the hell?
 
D

Doug Miller

Why is it us little guys give a shit about code and the big guys could care
less?

Not necessarily true, e.g.

ibm.com: This document was successfully checked as XHTML 1.0 Strict!
sony.com: This document was successfully checked as XHTML 1.0 Transitional!
navy.mil: This document was Tentatively checked as HTML 4.01 Transitional (2
warnings)
 
T

Tim Streater

richard said:
Why is it us little guys give a shit about code and the big guys could care
less?
Just for fun I plugged in msnbc.com into the validator.
33 warnings
245 errors.
Then you have the full blown google page.
84 warnings
187 errors.

The big guys obviously rely on the browser to fix their errors.
But hey, if it works, what the hell?

Didn't you shove your stuff through the browser to see how it looked,
before asking here for help? Did you use the browser's debugging tools
to see if there were any clues there?
 
J

Jukka K. Korpela

Under Subject: Re: Where is the error?
Lewis said:
I thought that was legal, actually. Odd, but legal.

It is "legal", i.e. valid and conforming. Whitespace is allowed before TAGC,
i.e. tag close, for which the reference SGML syntax and the HTML syntax use
the ">" character. Ref.: ISO 8879, 7.4. The current HTML5 drafts, which
abandon SGML as the formal basis, still agree with it in this issue, see
http://dev.w3.org/html5/spec/Overview.html#start-tags

It isn't even particularly odd to have whitespace before ">", though
normally the whitespace is a line break and it's only used when the tag is
long, e.g.
<a hreflang="da" title="Try this, dude!"
href="supercalifralisticexpialidocious.html"
supercalifralisticexpialidocious</a>
(Why not put the line break _after_ ">"? Well, by SGML rules, browsers
should ignore the line break, but they are known to fail in such issues, so
it is safer to put the line break inside the tag, where all browsers ignore
it.)
 
D

dorayme

Lewis said:
I thought that was legal, actually. Odd, but legal.

If I carelessly implied it was illegal (which I probably did)
when I was listing errors to Richard, thanks for the correction.
But when we settle our little bet about not all GG being
worthless, I *will* pay a little compensation.

What is worrying about <br > is that it can lead to <br /> (too
often seen in xhtml) which should be <br/>. And, of course, I get
confused by all this and

<http://dorayme.netweaver.com.au/jokes/dancing.html>
 
P

P E Schoen

"Sherm Pendley" wrote in message
Some of us take pride in doing high-quality work. It's the
difference between a craftsman and an assembly line worker.

As I tell prospective clients,

I can do it cheap,
I can do it fast, and
I can do it well.

Pick any two...

Paul
 
C

cwdjrxyz

If I carelessly implied it was illegal (which I probably did)
when I was listing errors to Richard, thanks for the correction.
But when we settle our little bet about not all GG being
worthless, I *will* pay a little compensation.

What is worrying about <br > is that it can lead to <br /> (too
often seen in xhtml) which should be <br/>. And, of course, I get
confused by all this and>

Xhtml has now been around for around a decade. Writing <br/> for self-
closing is perfectly correct, the best I recall. However, at least
early on, this gave some browsers problems. Thus someone, and it could
have been the w3c, suggested using <br /> instead as this satisfied
some browsers about a decade ago that had problems with <br/>. I
believe adding an extra space is not illegal, although I have not
checked detailed specifications in a long time, but the w3c validator
does not complain if you add the extra space. I have seen some early
smil xml pages that worked just fine without the added space. With the
new generation of browsers that have been developed in the last
decade, I don't know if adding the extra space is still needed for any
browsers now commonly used.
 
J

Jukka K. Korpela

cwdjrxyz said:
Xhtml has now been around for around a decade. Writing <br/> for self-
closing is perfectly correct, the best I recall.

Did you actually ever check the XHTML 1.0 specification about this?
 
D

dorayme

<[email protected]
m>,

I think I should not have said this, it was hasty and injudicious
and various other things!
Xhtml has now been around for around a decade. Writing <br/> for self-
closing is perfectly correct, the best I recall. However, at least
early on, this gave some browsers problems. Thus someone, and it could
have been the w3c, suggested using <br /> instead as this satisfied
some browsers about a decade ago that had problems with <br/>. I
believe adding an extra space is not illegal,

In fact, I think the space more the usual way with those that go
in for this business.
 
C

cwdjrxyz

Did you actually ever check the XHTML 1.0 specification about this?

I don't remember if I checked the w3c directly many years ago or if I
checked something else that mentioned it. Anyway, I still can find the
old w3c reference given below.

Refer to the w3c page http://www.w3.org/TR/xhtml1/Cover.html which
starts:

"XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)
A Reformulation of HTML 4 in XML 1.0
W3C Recommendation 26 January 2000, revised 1 August 2002

Then go to the section :


http://www.w3.org/TR/xhtml1/guidelines.html which gives in part:


This appendix is informative.

This appendix summarizes design guidelines for authors who wish their
XHTML documents to render on existing HTML user agents. Note that this
recommendation does not define how HTML conforming user agents should
process HTML documents. Nor does it define the meaning of the Internet
Media Type text/html. For these definitions, see [HTML4] and [RFC2854]
respectively.
C.1. Processing Instructions and the XML Declaration

Be aware that processing instructions are rendered on some user
agents. Also, some user agents interpret the XML declaration to mean
that the document is unrecognized XML rather than HTML, and therefore
may not render the document as expected. For compatibility with these
types of legacy browsers, you may want to avoid using processing
instructions and XML declarations. Remember, however, that when the
XML declaration is not included in a document, the document can only
use the default character encodings UTF-8 or UTF-16.
C.2. Empty Elements

Include a space before the trailing / and > of empty elements, e.g.
<br />, <hr /> and <img src="karen.jpg" alt="Karen" />. Also, use the
minimized tag syntax for empty elements, e.g. <br />, as the
alternative syntax <br></br> allowed by XML gives uncertain results in
many existing user agents."

Thus </br> (with of course an opening <br>) apparently was allowed by
xml rules, but such usage could cause problems with some browsers of
the era. If you could get away with using <br></br> or only </br>
alone today on modern browsers with a higher level of xhtml such as
1.1, I do not know for sure, because I have not checked this on many
current browsers. In any case, I have used only <br /> for xhtml 1.1
for many years without problems.
 
J

Jukka K. Korpela

cwdjrxyz said:
Thus </br> (with of course an opening <br>) apparently was allowed by
xml rules, but such usage could cause problems with some browsers of
the era. If you could get away with using <br></br> or only </br>
alone today on modern browsers with a higher level of xhtml such as
1.1, I do not know for sure, because I have not checked this on many
current browsers. In any case, I have used only <br /> for xhtml 1.1
for many years without problems.

None of the constructs was the one under discussion, namely <br/>, which you
claimed to be "perfectly correct".

The parts that you quoted (but perhaps didn't read) say that <br/> is not
OK, or "perfectly correct" to use your words, by the specifications.
 
C

cwdjrxyz

None of the constructs was the one under discussion, namely <br/>, which you
claimed to be "perfectly correct".

The parts that you quoted (but perhaps didn't read) say that <br/> is not
OK, or "perfectly correct" to use your words, by the specifications.

The key is that everything in xml must be closed. Thus both <br> and </
br> considered alone are correct, but in xml they must be used as the
pair <br></br> to satisfy that everything is closed in xhtml.
Unfortunately this confused some browsers when xhtml first came out,
as <br> does not have to be closed in html.. Hence <br /> was used as
combined open and close break since it did not confuse some browsers
of the era. It also is a bit less to type than <br><br />. In my
response I apparently misread <br/> as </br>, which is of course not
correct.
 

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
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top