W3C Validation: Finding new methods for old HTML codes

  • Thread starter news frontiernet.net
  • Start date
N

news frontiernet.net

I am trying to find new methods to code that will validate with the W3C
HTML validator in strcit mode.

The W3C Validator in strict mode rejects these markups

Table height ( must I style, ID or class each table?)
Table border( same ?)
img border ( must I style, ID or class each image?)
img lowsrc ( what replaces this in CSS? I find this very helpful but where
is it in CSS?)
img align
img hspace ( i have tried using css padding but not found anything that
seems to ne reliabler?)
img vspace
a target ( what replaces this in CSS?)
hr color
hr width
hr size

Is there a document somewhere that would give me some help rerplacing old
codes with new CSS attributes? I have searched for one, but so far it eludes
me.
 
M

Mark Parnell

I am trying to find new methods to code that will validate with the W3C
HTML validator in strcit mode.

Did you try reading the specs?
http://www.w3.org/TR/html4/
http://www.w3.org/TR/CSS21/
Table height ( must I style, ID or class each table?)

Just don't specify a height at all. The height of the table will be
adjusted automatically according to the content. Unless you're using
tables for layout, of course. In which case the answer is don't.
http://www.allmyfaqs.com/faq.pl?Tableless_layouts
Table border( same ?)

That depends. If you want all tables to have no border (or the same
border), you don't need to apply a class or ID. If you want it different
for each table, then yes. But how many different types of tables could
one site have?
img border ( must I style, ID or class each image?)

Again, you can set it for all images, or if you want it to be different
for different images, a class or ID is needed.
img lowsrc ( what replaces this in CSS? I find this very helpful but where
is it in CSS?)

AFAICT that has never been part of any HTML specs. Besides, it is about
content, not presentation, so has nothing to do with CSS.
img align

CSS: text-align (or possible float, depending on exactly what you are
trying to do)
img hspace ( i have tried using css padding but not found anything that
seems to ne reliabler?)
img vspace

For both either margin or padding, depending on whether you want it
inside or outside the border.
a target ( what replaces this in CSS?)

Nothing. You shouldn't be using it at all.

CSS: border-color

CSS: width

CSS: border-width
Is there a document somewhere that would give me some help rerplacing old
codes with new CSS attributes? I have searched for one, but so far it eludes
me.

Fairly basic, but all I could find after a quick search:
http://css.nu/articles/translate.html
 
A

Adrienne

Gazing into my crystal ball I observed "news frontiernet.net"
I am trying to find new methods to code that will validate with the
W3C HTML validator in strcit mode.

The W3C Validator in strict mode rejects these markups

Table height ( must I style, ID or class each table?)

IMHO, table height should be whatever height the table needs to be, unless
of course, you're using (abusing) it for layout
Table border( same ?)

table {border:thin solid #000;} /* puts a border around the table */

img border ( must I style, ID or class each image?)

img (border:0;} /* or if you want a border, then put one */
img lowsrc ( what replaces this in CSS? I find this very helpful but
where is it in CSS?)

none - that's a proprietary attribute that is not part of the HTML 4 spec
img align

img {float:left;} /* floats an image to the left */
img hspace ( i have tried using css padding but not found anything that
seems to ne reliabler?)

img {margin:1em;} /* puts a 1em margin around the entire image, change to
suit */
img vspace

See above
a target ( what replaces this in CSS?)

No such thing, and there's good reason for it. If the user wants to open a
link in a new window, that's up to the user, not you.
hr color
hr width
hr size

hr {color:#000; background-color:#000; width:50%; height:2px;}
Is there a document somewhere that would give me some help rerplacing
old codes with new CSS attributes? I have searched for one, but so far
it eludes me.

When I started using CSS, I found http://www.blooberry.com/indexdot/css
very helpful. Of course, you can always check the specs,
http://www.w3.org/TR/REC-CSS1 and http://www.w3.org/TR/REC-CSS2/ .
 
S

Sam Hughes

I am trying to find new methods to code that will validate with the
W3C HTML validator in strcit mode.

The W3C Validator in strict mode rejects these markups
Table height ( must I style, ID or class each table?)

CSS has a height property.
Table border( same ?)

CSS has a border property. To emulate border="1" you can use
table {
border: 1px outset #777;
}
td {
border: 1px inset #777;
}
img border ( must I style, ID or class each image?)

the border property again.
img lowsrc ( what replaces this in CSS? I find this very helpful but
where is it in CSS?)

The lowsrc attribute is useless in terms of bandwidth; it will actually
increases bandwidth use.
img align

float property.
img hspace ( i have tried using css padding but not found anything
that seems to ne reliabler?)
img vspace

margin properties
a target ( what replaces this in CSS?)

A replacement might exist in the future, but none exists now. However,
that doesn't mean you should use javascript in order to validate. That
is a tool, not an end in itself, and using the target attribute instead
of javascript is a good idea.

However, usually, opening new windows annoys visitors, if you are using
it for something like links to external sites. But I must give you the
benefit of the doubt.

This only works in Internet Explorer, anyway. You can use border color
or background color to acheive the same or better effects.

CSS has a width property.

CSS has a height property.
Is there a document somewhere that would give me some help rerplacing
old codes with new CSS attributes? I have searched for one, but so far
it eludes me.

I have half a mind to write one, and it may be based on this post.
 
N

Neal

hr color
hr width
hr size


Instead of hr, use a border of a div. hr really isn't very content-ish,
actually. If you absolutely need one even with CSS off, I'd style a div
border and set the hr to display:none for the CSS rendering. When there's
no CSS the hr will be visible, when there is the border of the div will be.
 
S

Spartanicus

news frontiernet.net said:
The W3C Validator in strict mode rejects these markups

Table border

Incorrect, the border attribute on the <table> element is not
deprecated. Table borders can be considered structural in certain
circumstances. There's also a presentational advantage of expressing it
in HTML: UAs typically draw prettier borders adjusted to the background.
 
S

Sam Hughes

Instead of hr, use a border of a div. hr really isn't very
content-ish, actually. If you absolutely need one even with CSS
off, I'd style a div border and set the hr to display:none for the
CSS rendering. When there's no CSS the hr will be visible, when
there is the border of the div will be.

Why? That is just backward.

Since you already agree to include the horizontal rule, you may as
well have it be visible; it means much more as a generic separator
than does a div's border.
 
S

Spartanicus

Sam Hughes said:
Are cellpadding and cellspacing structural as well?

I can't think of an example where that would apply, but maybe.

It's more clear with regard to the also not deprecated align and valign
cell attributes. It's easy to think of an example where the visual
structure of the data in a table needs these attributes and they
therefore should not be replaced by (optional) css.
 
K

Karl Groves

news frontiernet.net said:
I am trying to find new methods to code that will validate with the W3C
HTML validator in strcit mode.

The W3C Validator in strict mode rejects these markups

Table height ( must I style, ID or class each table?)
CSS

Table border( same ?)
CSS

img border ( must I style, ID or class each image?)
CSS

img lowsrc ( what replaces this in CSS? I find this very helpful but where

If your picture is too big, make it smaller.
is it in CSS?)
img align
CSS

img hspace ( i have tried using css padding but not found anything that
seems to ne reliabler?)

CSS (margin)
img vspace
CSS

a target ( what replaces this in CSS?)

Are you using frames?
If not, then stop abusing the attribute. Opening new windows is abusing your
visitor
hr color
CSS

hr width
CSS

hr size
CSS


Is there a document somewhere that would give me some help rerplacing old
codes with new CSS attributes? I have searched for one, but so far it eludes
me.

Google is your friend.



--
Karl Core

Link of the day: http://216.127.86.74/dubyaresume.com/

http://www.karlcore.com
http://www.usabilityinfo.com
http://www.murderthestupid.com
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top