Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > W3C Validation: Finding new methods for old HTML codes

Reply
Thread Tools

W3C Validation: Finding new methods for old HTML codes

 
 
news frontiernet.net
Guest
Posts: n/a
 
      08-12-2004
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.




 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      08-12-2004
On Thu, 12 Aug 2004 22:32:28 GMT, "news frontiernet.net"
<(E-Mail Removed)> declared in alt.html:

> 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.

> hr color


CSS: border-color

> hr width


CSS: width

> hr size


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

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      08-12-2004
Gazing into my crystal ball I observed "news frontiernet.net"
<(E-Mail Removed)> writing in news:0eSSc.975$(E-Mail Removed):

> 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/ .



--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
Sam Hughes
Guest
Posts: n/a
 
      08-12-2004
"news frontiernet.net" <(E-Mail Removed)> wrote in
news:0eSSc.975$(E-Mail Removed):

> 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.

> hr color


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

> hr width


CSS has a width property.

> hr size


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.

--
How to make it so visitors can't resize your fonts:
<http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      08-13-2004
On 12 Aug 2004 23:36:51 GMT, Sam Hughes <(E-Mail Removed)> declared in
alt.html:

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


Please do - I couldn't find a decent one when I searched.

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-13-2004
On Thu, 12 Aug 2004 22:32:28 GMT, news frontiernet.net
<(E-Mail Removed)> wrote:


> 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.
 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      08-13-2004
"news frontiernet.net" <(E-Mail Removed)> wrote:

>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.

--
Spartanicus
 
Reply With Quote
 
Sam Hughes
Guest
Posts: n/a
 
      08-13-2004
Neal <(E-Mail Removed)> wrote in
news(E-Mail Removed):

> On Thu, 12 Aug 2004 22:32:28 GMT, news frontiernet.net
> <(E-Mail Removed)> wrote:
>
>
>> 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.


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.

--
How to make it so visitors can't resize your fonts:
<http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
 
Reply With Quote
 
Sam Hughes
Guest
Posts: n/a
 
      08-13-2004
Spartanicus <(E-Mail Removed)> wrote in
news:(E-Mail Removed) anicus.utvinternet.
ie:

> Table borders can be considered structural in certain circumstances.


Are cellpadding and cellspacing structural as well?

--
How to make it so visitors can't resize your fonts:
<http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      08-13-2004
Sam Hughes <(E-Mail Removed)> wrote:

>> Table borders can be considered structural in certain circumstances.

>
>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.

--
Spartanicus
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read html file into org.w3c.dom.html.htmldocument Jozza Java 1 03-04-2010 11:22 AM
how to write codes to connect access database using html codes hiralcp Software 0 12-18-2007 08:49 PM
Virtual Key Codes, Scan Codes and ASCII Codes in C gj_williams2000@yahoo.co.uk C Programming 2 08-20-2005 11:04 AM
RegEx replace of html codes to ascii codes Greg -- ASP .Net 4 08-09-2005 07:27 PM
W3C Validator Icon and W3C Valdiator page Frank HTML 9 05-03-2004 09:32 AM



Advertisments