473,796 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Name attribute question

I have a few questions about the name attributes and href referencing
to. Can you declare name attributes for tags other than anchor
elements (like div or h2)? The validator keeps returning the following
error for HTML 4.0 strict .

Line 139, column 12: there is no attribute "NAME"

<h2 name="heading"> H2 Headline </h2>

| You have used the attribute named above in your document, but the document type | you are using does not support that attribute for this element. This error is often
| caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transition al" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheig ht" (this is usually fixed by using CSS to achieve the desired effect instead).

My goal is to create hot links to specific sections of the document.
This objective does not refer to documents outside the current
document covered by traditional anchor elements (href). One developer
suggested that you could replace the following.

<a name="heading"> </a>

<h2 name="heading"> H2 Headline </h2>

So I made the changes and discovered that these changes did not
validate. This discovery happens after sometime away from the document
in question. Upon revisiting the document, the errors left me
perplexed and at odds. A quick Google search only led me to
descriptions about traditional anchors and the name attributes. These
results did not mention name attributes in other elements. Maybe, I
did not remember the correct term for hot links within a document.
Does anybody have any links that explain what I call hot links? Does
this scenario only occur in HTML 4.0 (and not xHTML)? Please give a
brief description of this topic if appropriate.

Jul 21 '05 #1
5 5771
Neville310 wrote:

My goal is to create hot links to specific sections of the document.
This objective does not refer to documents outside the current
document covered by traditional anchor elements (href). One developer
suggested that you could replace the following.

<a name="heading"> </a>
<h2 name="heading"> H2 Headline </h2>

Use the "id" tag. The id value must be unique to validate.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #2
In message <ft************ *************** *****@4ax.com>, Neville310
<r0bert_neville @y.?.com.invali d> writes
I have a few questions about the name attributes and href referencing
to. Can you declare name attributes for tags other than anchor
elements (like div or h2)? The validator keeps returning the following
error for HTML 4.0 strict .

Line 139, column 12: there is no attribute "NAME"

<h2 name="heading"> H2 Headline </h2>

| You have used the attribute named above in your document, but the
document type | you are using does not support that attribute for this
element. This error is often
| caused by incorrect use of the "Strict" document type with a document
that uses frames (e.g. you must use the "Transition al" document type to
get the "target" attribute), or by using vendor proprietary extensions
such as "marginheig ht" (this is usually fixed by using CSS to achieve
the desired effect instead).

My goal is to create hot links to specific sections of the document.
This objective does not refer to documents outside the current
document covered by traditional anchor elements (href). One developer
suggested that you could replace the following.

<a name="heading"> </a>

<h2 name="heading"> H2 Headline </h2>

So I made the changes and discovered that these changes did not
validate. This discovery happens after sometime away from the document
in question. Upon revisiting the document, the errors left me
perplexed and at odds. A quick Google search only led me to
descriptions about traditional anchors and the name attributes. These
results did not mention name attributes in other elements. Maybe, I
did not remember the correct term for hot links within a document.
Does anybody have any links that explain what I call hot links? Does
this scenario only occur in HTML 4.0 (and not xHTML)? Please give a
brief description of this topic if appropriate.


<div style="width:10 0%;">
<h2 id="lab0"><a name="lab0">INT RODUCTION.</a></h2>
</div>
--
Jake
(ja**@gododdin. demon.co.uk .... just a spam trap.)

Jul 21 '05 #3
jake wrote:
<h2 id="lab0"><a name="lab0">INT RODUCTION.</a></h2>


Have a look at the illegal example in
<http://www.w3.org/TR/html4/struct/links.html#h-12.2.3>

xpost and f'up2 ciwah
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 21 '05 #4
Jim Moe wrote:
Neville310 wrote:

My goal is to create hot links to specific sections of the document.
This objective does not refer to documents outside the current
document covered by traditional anchor elements (href). One developer
suggested that you could replace the following.

<a name="heading"> </a>
<h2 name="heading"> H2 Headline </h2>

Use the "id" tag. The id value must be unique to validate.

There's no such thing as an "id" tag. Have you ever seen <id> in an HTML
file?
Jul 21 '05 #5
Harlan Messinger wrote:

<a name="heading"> </a>
<h2 name="heading"> H2 Headline </h2>

Use the "id" tag. The id value must be unique to validate.

There's no such thing as an "id" tag. Have you ever seen <id> in an HTML
file?


<sigh>. Ya know, I had originally said "attribute" but then second
guessed myself by thinking about "tag soup" styling.
And mentioning that it is a attribute rather than a tag is more
informative than "Bzzt! Wrong!"

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2040
by: Peter N. Schweitzer | last post by:
The function get_meta_tags reads a file or URL and returns an array, one element for each META tag in the HEAD element of the document. The keys of this array are the values of the name attribute for each tag, the value of the array is, for any META tag, the text contained in the content attribute of the tag. So for example, given a file or url whose head element contains <meta name="keywords" content="PHP language; HTML meta tag;...
9
6049
by: aragon | last post by:
Hi all, is it legal to use a fully-numeric string as "name" attribute for the <select> tag in the XHTML standard? E.g.: <form action="action.php" method="get"> <select name="12345"> <option value="1">test</option> </select>
1
2180
by: Jenny | last post by:
Hi, Can I create an array of tags by assigning same name to these tags? For example, I have two <p> tags with the same name t1. But document.all.b.value=document.all.t.length does not work. It works if the tags are <input type=radio...>. This line is OK:
6
1359
by: Richard | last post by:
<a href="#" name="sample">link 1</a> <a href="#" name="sample">link 2</a> Would this be invalid use of the name? If I wanted to have a function that would be acted upon by detection of the "name", would this happen if all "name"s in a group were the same? I know ID can only be used once per document, what about "name"? If this is invalid, then if I went by a unique ID, such as sample1, sample2, sampl3, is there a way to eliminate the...
10
1789
by: Neville310 | last post by:
I have a few questions about the name attributes and href referencing to. Can you declare name attributes for tags other than anchor elements (like div or h2)? The validator keeps returning the following error for HTML 4.0 strict . Line 139, column 12: there is no attribute "NAME" <h2 name="heading">H2 Headline </h2> | You have used the attribute named above in your document, but the document type | you are using does not support...
5
3756
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for Office 2000. I am creating a database to track student athletes. I have created the following tables. The table title is to the far left, with fields under each. The common field will be the StudentID field, which is their student number assigned...
1
2449
by: Simon Barnett | last post by:
Hi, RE: Converting pages including ASP pages for XHTML My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP and hoped it was still relevant in ASP.NET - sorry if it's not. Problem: I am teaching myself about validating for XHTML and, upon testing a page I get errors for the use of the 'name' attribute in form fields. It seems that you have to replace the 'name' attribute for the 'id' attribute.
24
2521
by: Chameleon | last post by:
This code does not working in Mozilla. Works fine in IE. -------------- <input type=text value=100 name=textbox> <script> alert(textbox); </script> -------------- This perhaps, because of Microsoft policy to globalize all tag names. Is there any method for cross-browser fix without using getelementbyid?
4
2386
by: simon | last post by:
hi, I would like to separate my javascript completely from my xhtml. in the end there should be only <script type="text/javascript" src="javalib.js"></script> in the head-tag to my javascript. Because I want to use some ajax-requests and other javascript-functions on my xhtml, I need to dynamically add event handlers to any possible dom-elements. All solutions I found so fare are for specific, pre-known
0
9531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.