Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / October 2007



Tip: Looking for answers? Try searching our database.

this HTML seems perfectly good but won't validate... any idea?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Summercool - 28 Oct 2007 12:46 GMT
this HTML seems perfectly good but won't validate... any idea?

 http://www.0011.com/test_size2.html
Safalra (Stephen Morley) - 28 Oct 2007 13:07 GMT
> this HTML seems perfectly good but won't validate... any idea?
>
>   http://www.0011.com/test_size2.html

You need to escape the ampersands in your href attributes - replace each &
with & and you won't have the problem of undefined entities.

Signature

Safalra (Stephen Morley)

The 'white-space' Property In CSS:
http://www.safalra.com/web-design/css/white-space-property/

Beauregard T. Shagnasty - 28 Oct 2007 13:29 GMT
> this HTML seems perfectly good but won't validate... any idea?
>
>   http://www.0011.com/test_size2.html

It is your link to the validator. Replace "&" with "&"

That said, why are you writing new pages as Transitional? Use Strict.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">

Signature

  -bts
  -Motorcycles defy gravity; cars just suck

Summercool - 28 Oct 2007 14:49 GMT
On Oct 28, 5:29 am, "Beauregard T. Shagnasty"
<a.nony.m...@example.invalid> wrote:
> > this HTML seems perfectly good but won't validate... any idea?
>
[quoted text clipped - 6 lines]
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>    "http://www.w3.org/TR/html4/strict.dtd">

great.  i tried using strict and it validates except for  <img
border="0" ... >
it didn't complain for not using  <img     />  but just  <img    >
so only XHTML requires that huh...   the strict means strict HTML 4.01
standard, while loose means deprecated stuff is ok?
Safalra (Stephen Morley) - 28 Oct 2007 15:45 GMT
> On Oct 28, 5:29 am, "Beauregard T. Shagnasty"
> <a.nony.m...@example.invalid> wrote:
[quoted text clipped - 8 lines]
> great.  i tried using strict and it validates except for  <img
> border="0" ... >

Presentational attributes are deprecated and are not permitted with a
strict doctype. To remove the borders from image links use this rule in
your stylesheet:

a img{
 border:0;
}

> it didn't complain for not using  <img     />  but just  <img    >
> so only XHTML requires that huh...

XHTML does not permit 'empty' elements, so all tags must have a matching
closing tag. The <element /> syntax is a short version of
<element></element>.

> the strict means strict HTML 4.01
> standard, while loose means deprecated stuff is ok?

Basically, although I seem to remember being corrected here (or in ciwah)
when I made that assumption long ago, as it isn't quite accurate.

Signature

Safalra (Stephen Morley)

The 'white-space' Property In CSS:
http://www.safalra.com/web-design/css/white-space-property/

Beauregard T. Shagnasty - 28 Oct 2007 15:53 GMT
>>> this HTML seems perfectly good but won't validate... any idea?
>>>  http://www.0011.com/test_size2.html
[quoted text clipped - 8 lines]
> great.  i tried using strict and it validates except for  <img
> border="0" ... >

Use CSS to set borders.

img { border: 0; }

> it didn't complain for not using  <img     />  but just  <img    >
> so only XHTML requires that huh...

Correct.

> the strict means strict HTML 4.01 standard, while loose means
> deprecated stuff is ok?

"loose" is Transitional, which, as the word implies, is for
'transitioning' old legacy documents without needing to remove (most)
presentational markup from the HTML. New documents should all be Strict,
and use CSS for presentation. Also, it does make the markup a lot easier
to maintain.

Signature

  -bts
  -Motorcycles defy gravity; cars just suck

Beauregard T. Shagnasty - 28 Oct 2007 16:20 GMT
Beauregard T. Shagnasty replied to hisself:

>> great.  i tried using strict and it validates except for  <img
>> border="0" ... >
>
> Use CSS to set borders.
>
> img { border: 0; }

Oh, and you can also make somewhat fancy borders for images that
resemble picture frames, if that suits your fancy.

img {
  border-top: 4px outset #d0d0d0;
  border-left: 4px outset #d0d0d0;
  border-right: 4px outset #a9a9a9;
  border-bottom: 4px outset #a9a9a9;
}

outset or inset ...

Signature

  -bts
  -Motorcycles defy gravity; cars just suck

Jonathan N. Little - 28 Oct 2007 15:51 GMT
> this HTML seems perfectly good but won't validate... any idea?
>
>   http://www.0011.com/test_size2.html

Did you read the error messages?

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.0011.com%2Ftest_siz
e2.html

[Invalid] Markup Validation of http://www.0011.com/test_size2.html - W3C
Markup Validator

Also why are you creating a new document with a transitional doctype?

Signature

Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.