Tag Id

Tag Id

am 20.12.2007 00:13:33 von Shapper

Hello,

When should I give an ID to a tag?
Only if I want to refer it?

And is there any type of tags that should always have an ID? Inputs
for example?

Thanks,
Miguel

Re: Tag Id

am 20.12.2007 00:21:12 von rf

"shapper" wrote in message
news:a7ad3090-9d96-41c1-bbbd-506260d22b3f@l32g2000hsh.google groups.com...
> Hello,
>
> When should I give an ID to a tag?
> Only if I want to refer it?
>
> And is there any type of tags that should always have an ID? Inputs
> for example?

http://www.w3.org/TR/html401/struct/global.html#adef-id

--
Richard.

Re: Tag Id

am 20.12.2007 00:36:27 von dorayme

In article ,
"rf" wrote:

> "shapper" wrote in message
> news:a7ad3090-9d96-41c1-bbbd-506260d22b3f@l32g2000hsh.google groups.com...
> > Hello,
> >
> > When should I give an ID to a tag?
> > Only if I want to refer it?
> >
> > And is there any type of tags that should always have an ID? Inputs
> > for example?
>
> http://www.w3.org/TR/html401/struct/global.html#adef-id

I wonder if OP reads posts on this group? There was a thread
recently:

http://tinyurl.com/2xfcmq

or does he *just* use the ng to ask questions?

(Am I being too unkind? Jukka refuses to come on and administer
his bitter salts and now I realise there is something missing...
)

--
dorayme

Re: Tag Id

am 20.12.2007 00:45:42 von rf

"dorayme" wrote in message
news:doraymeRidThis-6CED2F.10362720122007@news-vip.optusnet. com.au...
> In article ,
> "rf" wrote:
>
>> "shapper" wrote in message
>> news:a7ad3090-9d96-41c1-bbbd-506260d22b3f@l32g2000hsh.google groups.com...
>> > Hello,
>> >
>> > When should I give an ID to a tag?
>> > Only if I want to refer it?
>> >
>> > And is there any type of tags that should always have an ID? Inputs
>> > for example?
>>
>> http://www.w3.org/TR/html401/struct/global.html#adef-id
>
> I wonder if OP reads posts on this group? There was a thread
> recently:
>
> http://tinyurl.com/2xfcmq
>
> or does he *just* use the ng to ask questions?

Typical of google groupers. They don't know that google can also be used to
search for stuff.

Fishes and fishing come to mind.

The required effect is for the OP to do some of his own homework :-)

--
Richard.

Re: Tag Id

am 20.12.2007 03:24:33 von Blinky the Shark

rf wrote:

>
> "shapper" wrote in message
> news:a7ad3090-9d96-41c1-bbbd-506260d22b3f@l32g2000hsh.google groups.com...
>> Hello,
>>
>> When should I give an ID to a tag?
>> Only if I want to refer it?
>>
>> And is there any type of tags that should always have an ID? Inputs
>> for example?
>
> http://www.w3.org/TR/html401/struct/global.html#adef-id

Corollary question: what's the best -- id or name? Or does that just
depend? If the latter, on what?

--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project - http://improve-usenet.org

Re: Tag Id

am 20.12.2007 10:05:57 von Adrienne Boswell

Gazing into my crystal ball I observed Blinky the Shark
writing in
news:pan.2007.12.20.02.24.33.318594@thurston.blinkynet.net:

> rf wrote:
>
>>
>> "shapper" wrote in message
>> news:a7ad3090-9d96-41c1-bbbd-
506260d22b3f@l32g2000hsh.googlegroups.com
>> ...
>>> Hello,
>>>
>>> When should I give an ID to a tag?
>>> Only if I want to refer it?
>>>
>>> And is there any type of tags that should always have an ID? Inputs
>>> for example?
>>
>> http://www.w3.org/TR/html401/struct/global.html#adef-id
>
> Corollary question: what's the best -- id or name? Or does that just
> depend? If the latter, on what?
>

In a form it makes a lot of difference.

I can have:
Which one does not belong?
Dog
Cat
Handbag

I can get to the different radios using their id values. But if all are
checked, then server side I will get field=dog, cat, handbag. Since
handbag is not an animal, then I could style field3 to alert the user
they had made a mistake.

Further, id can be used on almost any element, where name can only be
used on a few. I can put an id on a h2 element, but not a name, eg.


The one thing I enjoy shopping for most is title="Find out more about shoes">shoes.

could go to

id="shoes">Shoes





--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: Tag Id

am 20.12.2007 10:39:49 von Blinky the Shark

Adrienne Boswell wrote:

> Gazing into my crystal ball I observed Blinky the Shark
> writing in
> news:pan.2007.12.20.02.24.33.318594@thurston.blinkynet.net:
>
>> rf wrote:
>>
>>>
>>> "shapper" wrote in message
>>> news:a7ad3090-9d96-41c1-bbbd-
> 506260d22b3f@l32g2000hsh.googlegroups.com
>>> ...
>>>> Hello,
>>>>
>>>> When should I give an ID to a tag?
>>>> Only if I want to refer it?
>>>>
>>>> And is there any type of tags that should always have an ID? Inputs
>>>> for example?
>>>
>>> http://www.w3.org/TR/html401/struct/global.html#adef-id
>>
>> Corollary question: what's the best -- id or name? Or does that just
>> depend? If the latter, on what?
>>
>
> In a form it makes a lot of difference.
>
> I can have:
> Which one does not belong?
> Dog
> Cat
> Handbag
>
> I can get to the different radios using their id values. But if all are
> checked, then server side I will get field=dog, cat, handbag. Since
> handbag is not an animal, then I could style field3 to alert the user
> they had made a mistake.
>
> Further, id can be used on almost any element, where name can only be
> used on a few. I can put an id on a h2 element, but not a name, eg.


> The one thing I enjoy shopping for most is > title="Find out more about shoes">shoes.

could go to

> id="shoes">Shoes



Ah! I did not know that name could not be used with some elements that
accept id.

Thanks, Adrienne.

--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project - http://improve-usenet.org

Re: Tag Id

am 20.12.2007 14:20:53 von Harlan Messinger

Blinky the Shark wrote:
> Adrienne Boswell wrote:
>
>> Gazing into my crystal ball I observed Blinky the Shark
>> writing in
>> news:pan.2007.12.20.02.24.33.318594@thurston.blinkynet.net:
>>
>>> rf wrote:
>>>
>>>> "shapper" wrote in message
>>>> news:a7ad3090-9d96-41c1-bbbd-
>> 506260d22b3f@l32g2000hsh.googlegroups.com
>>>> ...
>>>>> Hello,
>>>>>
>>>>> When should I give an ID to a tag?
>>>>> Only if I want to refer it?
>>>>>
>>>>> And is there any type of tags that should always have an ID? Inputs
>>>>> for example?
>>>> http://www.w3.org/TR/html401/struct/global.html#adef-id
>>> Corollary question: what's the best -- id or name? Or does that just
>>> depend? If the latter, on what?
>>>
>> In a form it makes a lot of difference.
>>
>> I can have:
>> Which one does not belong?
>> Dog
>> Cat
>> Handbag
>>
>> I can get to the different radios using their id values. But if all are
>> checked, then server side I will get field=dog, cat, handbag. Since
>> handbag is not an animal, then I could style field3 to alert the user
>> they had made a mistake.
>>
>> Further, id can be used on almost any element, where name can only be
>> used on a few. I can put an id on a h2 element, but not a name, eg.


>> The one thing I enjoy shopping for most is >> title="Find out more about shoes">shoes.

could go to

>> id="shoes">Shoes


>
> Ah! I did not know that name could not be used with some elements that
> accept id.

http://www.w3.org/TR/html401/index/attributes.html