/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] HTML Validation issue

HI ! I’m trying to have a W3C valid html site, But I have a lot of trouble to achieve !!

[URL=”http://www.lepreben.com/”]http://www.lepreben.com/[/URL]

First, I suspect that I have the wrong !DOCTYPE

When I change the doctype I have different errors ?

FYI my site is CSS/PHP/MySQL builded…

Thanks for your help !!

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 22.2008 — The DTD is good

The html tag use:<html lang="fr-CA">

Use entities for extended characters: http://www.w3.org/MarkUp/html3/latin1.html
Copy linkTweet thisAlerts:
@drhowarddrfineSep 22.2008 — The doctype is not something to be added later, nor something you change on a whim. It is the very first thing to be decided upon and the very first thing that goes on a page. And it never changes afterwards.

All new pages should always use the strict doctype. No one has any need for any other.
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 22.2008 — Thanks Fang ! this solved errors :-)

still...there a lot to be solved.

It seems to have a problem with my "<![if !IE 6]>"s , I can't understand what the real problem is.

then He dosent seems to appreciate the <a><div>image</div></a>, do you have a minor change solution or I should rewrite this part ??

Thanks a lot !
Copy linkTweet thisAlerts:
@FangSep 22.2008 — &lt;!--[if !IE 6]&gt;

Correcting this will hide ALL content from browsers except IE.

Use conditional comments to add css for IE, not large chunks of html.
&lt;div&gt;&lt;a&gt;image&lt;/a&gt;&lt;/div&gt;
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 22.2008 — Correcting this will hide ALL content from browsers except IE.

Use conditional comments to add css for IE, not large chunks of html.[/QUOTE]


oh ! I didn't knew that part.... :S ill validate the browser with javascript !

about the <div><a>image</a></div>...I've miss explained

this is the present scheme <a><div class="image"></div></a>

so the solution wont work since I cant have a blank <a></a>
Copy linkTweet thisAlerts:
@felgallSep 22.2008 — You can't put block elements (such as div) inside inline elements (such as a)

You need to substitute an inline element instead such as

<a><span class="image"></span></a>
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 23.2008 — <span> did the job !

I've implemented browser detection with PHP ! Works nice !!

Thanks a lot guys !! Now HTML / CSS W3C valid :-)
×

Success!

Help @fitzybizzle spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...