LINK tag

T

Tomba

hi all,

I was wondering if a LINK tag is actually good HTML in html 4.01
transitional.
I find it strange that with transitional 4.01 the w3c validator gets me an
error on this part:

Line 18, column 60: document type does not allow element "LINK" here
(explain...).
<link rel="search" href="./forum/search.php" title="Search" />
I am however quite sure it's correctly placed... that is within the <head>.
Does anyone know how comes??

thanks already,
Steven DG
 
A

Adrienne

hi all,

I was wondering if a LINK tag is actually good HTML in html 4.01
transitional.
I find it strange that with transitional 4.01 the w3c validator gets me
an error on this part:

Line 18, column 60: document type does not allow element "LINK" here
(explain...).
<link rel="search" href="./forum/search.php" title="Search" />
I am however quite sure it's correctly placed... that is within the
<head>. Does anyone know how comes??

There's probably some other element that is causing the problem. URL?
 
T

Tomba

ok well I found it...thanks!

the problem is in <link rel="search" href="./forum/search.php"
title="Search" /> the last two characters.
you should just write <link rel="search" href="./forum/search.php"
title="Search">
 
R

Richard

Tomba wrote:>>
ok well I found it...thanks!
the problem is in <link rel="search" href="./forum/search.php"
title="Search" /> the last two characters.
you should just write <link rel="search" href="./forum/search.php"
title="Search">

Because you tried closing the tag within the opening tag.
<link> and </link> not <link/>
<link/> would cause an error.
 
J

Jukka K. Korpela

Tomba said:
Line 18, column 60: document type does not allow element "LINK" here
(explain...).
<link rel="search" href="./forum/search.php" title="Search" />

In practical terms, the problem is on the line right above that line.
I am however quite sure it's correctly placed... that is within the
<head>.

Then you are wrong. It is within the body element, which was implicitly
opened by the preceding character data ">".

Short help: Un-learn whatever you have learned about "modern" style of
using "/>" at the end of tags instead of ">".

Long help (for those who wish to reject the simple advice):
http://www.cs.tut.fi/~jkorpela/html/empty.html
(well, you just need to read the first three sections to get the general
idea).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top