link css help re "type" media

T

tom watson

Error: unknown attribute "MEDIA" for element <link

i get above error for this code

<link href="../css/screen.css" rel="stylesheet" type="text/css">
<link href="../css/print.css" rel="stylesheet" type="text/css"
media="print">

what is wrong?
 
D

Dylan Parry

tom said:
Error: unknown attribute "MEDIA" for element <link

i get above error for this code

<link href="../css/screen.css" rel="stylesheet" type="text/css">
<link href="../css/print.css" rel="stylesheet" type="text/css"
media="print">

what is wrong?

It might help if you give us a URL with the full code?
 
R

rf

tom watson said:
Error: unknown attribute "MEDIA" for element <link

i get above error for this code

<link href="../css/screen.css" rel="stylesheet" type="text/css">
<link href="../css/print.css" rel="stylesheet" type="text/css"
media="print">

what is wrong?

You have not given us the URL so we can verify the validator actually pulls
this error. Copy/paste is not quite good enough :)

Cheers
Richard.
 
D

Dylan Parry

tom said:
The code I have given is all you need to see.

Is it correct? Is it wrong? what do I change?

The code you gave us looked fine, what is odd is that it doesn't validate
(you say) in which case we need to see the whole file not just a snippet.

What you have given us is *not* all we need to see.
 
T

tom watson

In linking a css file (like in the example below)
when validating the file - I get the message that "MEDIA" (like in the
example below) is an unknown attribute.
As far as I know it is common to have 2 css files linked to html page. one
for the 'screen css' and one for print.css
In the example of code I have given (which works when printing) when the
file is validated, I get the warning that "media" is the wrong attribute.

The code I have given is all you need to see.

Is it correct? Is it wrong? what do I change?

trust me it validates with an error

please help
 
S

Steve Pugh

tom watson said:
when validating the file - I get the message that "MEDIA" (like in the
example below) is an unknown attribute.
As far as I know it is common to have 2 css files linked to html page. one
for the 'screen css' and one for print.css
In the example of code I have given (which works when printing) when the
file is validated, I get the warning that "media" is the wrong attribute.

The code I have given is all you need to see.

How do you know that?
How do you the problem isn't the knock on effect from something else?

I'm fairly certain I know what the problem is but you haven't told us
enough to be sure. Post the URL and tell us which validator gives you
this error, then we'll be able to help you.

Oh, and please don't top post, it lowers your chances of getting help
even further.

Steve
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top