Web Design and Development Forums

Closing tags in the validator

This is a discussion on "Closing tags in the validator" within the Accessibility and Usability section. This forum, and the thread "Closing tags in the validator are both part of the Plan Your Website category.

Old Jan 13th, 2008, 21:46   #1 (permalink)
Reputable Member
 
Join Date: Mar 2007
Location: Tanzania
Age: 19
Posts: 209
Send a message via AIM to geyids Send a message via Yahoo to geyids Send a message via Skype™ to geyids
Closing tags in the validator

I have validated my page gives some errors but I dont know how it came up with them. Looks like all the closing tags > are all wrong. What could be the problem?? Checkout...
__________________
with great power comes with great responsibility :kicking: | this is me
geyids is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 13th, 2008, 21:48   #2 (permalink)
Section Manager - WOTM
Assistant Editor - LZ
 
Jack Franklin's Avatar
 
Join Date: May 2007
Location: Cornwall, England
Posts: 1,102
Blog Entries: 5
Re: Closing tags in the validator

You are not closing img tags correctly. You are using:
Code: Select all
<img src="image">
But for a xHTML doctype, it should be:
Code: Select all
<img src="image" />
HTH
__________________
Section Manager (WOTM)

My Weblog & E-Portfolio
Catch me daily on: Twitter | Digg | Flickr
Jack Franklin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 13th, 2008, 21:50   #3 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Closing tags in the validator

Moved to accessibility section.

You are using an XHTML doctype this means you need to self-close elements.
e.g. this:
HTML: Select all
<link href="style.css" rel="stylesheet" type="text/css">
becomes:
HTML: Select all
<link href="style.css" rel="stylesheet" type="text/css" />
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 13th, 2008, 22:19   #4 (permalink)
Reputable Member
 
Join Date: Mar 2007
Location: Tanzania
Age: 19
Posts: 209
Send a message via AIM to geyids Send a message via Yahoo to geyids Send a message via Skype™ to geyids
Re: Closing tags in the validator

is this wrong? Its from the google analytics code

Code: Select all
…s.com/ga.js' type='text/javascript'>\<\/script>" );
__________________
with great power comes with great responsibility :kicking: | this is me
geyids is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 13th, 2008, 22:37   #5 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Closing tags in the validator

I don't think there should be / inside those script tags.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 02:39   #6 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Closing tags in the validator

xHTML doctype:
HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 05:52   #7 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Closing tags in the validator

Use a strict doctype:
HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 06:37   #8 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Closing tags in the validator

I never know the differences....
Thanks Sir, you made me read Doctype article from W3School!

Quote:
HTML

HTML 4.01 specifies three document types: Strict, Transitional, and Frameset.

HTML Strict DTD

Use this when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


HTML Transitional DTD


The Transitional DTD includes presentation attributes and elements that W3C expects to move to a style sheet. Use this when you need to use HTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Quote:

XHTML


XHTML 1.0 specifies three XML document types: Strict, Transitional, and Frameset.

XHTML Strict DTD


Use this DTD when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


XHTML Transitional DTD


Use this DTD when you need to use XHTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
HTML: Select all
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I've been using the wrong one! Damn! What a shame!
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 06:38   #9 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Closing tags in the validator

You're calling me sir too now? Ha.
We usually don't mind whether it's a HTML or XHTML Doctype, just as long as it's strict.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 06:45   #10 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Closing tags in the validator

Yes Sir! Here is another nice article I found!


Quote:
Why do you like HTML 4.01 strict? Isn't it SO last season?

That may be so, but it's still a valid W3C 'standard,' and it is the latest standard with any widespread support. I think most people overestimate the benefits of XHTML, at the same time as they underestimate the benefits of using a Strict DTD. In my opinion, using a Strict DTD, either HTML 4.01 Strict or XHTML 1.0 Strict, is far more important for the quality of the future web than whether or not there is an X in front of the name. The Strict DTD promotes a separation of structure and presentation, which makes a site so much easier to maintain. You can re-style a site completely by updating a single CSS file, rather than making identical changes to 10,000 pages with presentational markup.

It also has lots of benefits for the user (quicker download) and the server (less bandwidth), as well as for search engines (better content-to-markup ratio). Last but not least, it makes it a lot easier to create an accessible site.

The main cause of confusion seems to be that many web authors think that HTML must be written as 'tag soup.' The truth is that you can - and should! - write HTML 4.01 that is almost identical to XHTML 1.0. Just because HTML allows some shortcuts doesn't mean that you should use them. There are even beginners who have been conned into believing that CSS can only be used with XHTML, not with HTML!
__________________


Last edited by alexgeek; Jan 14th, 2008 at 07:02.
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 06:50   #11 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Closing tags in the validator

Try to post the source so we don't seem like copy cats

edit,
This is? http://webstandardsgroup.org/features/tommy-olsson.cfm
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 14th, 2008, 07:00   #12 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Closing tags in the validator

Yeah, you are right about that link Sir! I got it from there!
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validator jtyoungs HTML Forum 8 Nov 8th, 2007 15:56
CSS Validator issues Hardbyte CSS Forum 11 Sep 6th, 2007 12:48
Web2.0 Validator spinal007 Webforumz Cafe 8 May 29th, 2007 17:38
W3C Validator Maverick25r CSS Forum 14 Oct 23rd, 2006 00:45
closing an application kal JavaScript Forum 4 Dec 13th, 2005 13:20



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 16:19.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59