Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 01-14-2008, 01:29 PM name= id= question
Novice Talker

Posts: 13
Trades: 0
Hi there
Can anyone explain where I've gone wrong here:
<a name="01" id="01"></a>
<p><strong>Where are the Cotswolds?</strong></p>
<p>Two hours West of London and one hour South of Birmingham in the heart of England.</p>
<p><a href="#">back to top</a></p>


I get this error: there is no attribute "name". <a name="01" id="01"></a>

and then this: value of attribute "id" invalid: "0" cannot start a name.
<a name="01" id="01"></a>

Working my way through validating this page: http://www.cotswold-scenes.com/faq.php
jimmybt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-14-2008, 01:59 PM Re: name= id= question
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
If you use the W3C Validation Service
http://validator.w3.org/
you will notice the errors starting with
Conflict between Mime Type and Document Type

In a Strict DOCTYPE, name is not used and is replace with id.

From running your page through the validator.
Quote:
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
An id cannot begin with a number.
joder is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 02:36 PM Re: name= id= question
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
In addition to that, if you're going to use an ID for an anchor, you don't even need the <a name=...> thing at all. Just put the ID on the element where you need it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 02:56 PM Re: name= id= question
Novice Talker

Posts: 13
Trades: 0
Thanks Joder and LadynRed. I took both your advice. I removed the id and also but in "A" instead of "1", seemed to work.
I've been using the w3c validator. Should I sort out the "Conflict between Mime Type and Document Type" warning that appears first?
jimmybt is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 02:58 PM Re: name= id= question
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Quote:
Originally Posted by jimmybt View Post
Thanks Joder and LadynRed. I took both your advice. I removed the id and also but in "A" instead of "1", seemed to work.
I've been using the w3c validator.
You removed the id and left the name? You should use id.

Quote:
Originally Posted by jimmybt View Post
Should I sort out the "Conflict between Mime Type and Document Type" warning that appears first?
Definitely.
joder is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 03:18 PM Re: name= id= question
Novice Talker

Posts: 13
Trades: 0
Thats what I meant to say.

Is the MIME/Doctype a simple fix?
jimmybt is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 04:07 PM Re: name= id= question
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
I think the XHTML1.1 doctype may not be supported fully in the browsers yet. LadynRed would have a better answer there.

Here is my DOCTYPE line which is XHTML 1.0 Strict

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
joder is offline
Reply With Quote
View Public Profile
 
Old 01-14-2008, 04:41 PM Re: name= id= question
Novice Talker

Posts: 13
Trades: 0
I added this and seems to work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
jimmybt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to name= id= question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30381 seconds with 12 queries