Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 09:25 PM
Dave Mausner
Guest
 
Posts: n/a
Default link css declarations?

the html 4.01 standard says i can use:
<link type="text/css" href=file-name>
to include a style section. questions:

1. does the external style sheet have to contain <html> ... </html>?
2. does it have to contain <style> ... </style>?
3. is <link> recognized within html page <style>?
4. is the <link href> a relative url, i.e., just a file name, or must it be
fully qualified?

finally could you post a working tag example that includes an external style
sheet in your html? thanks.
--
dave mausner v.708-848-2775 c.312-wake-my-i


  #2  
Old July 20th, 2005, 09:25 PM
Johannes Koch
Guest
 
Posts: n/a
Default Re: link css declarations?

Dave Mausner wrote:[color=blue]
> the html 4.01 standard says i can use:
> <link type="text/css" href=file-name>[/color]

No, it doesn't. href must be an URI.
[color=blue]
> to include a style section.[/color]

to include external style sheets.
[color=blue]
> questions:
>
> 1. does the external style sheet have to contain <html> ... </html>?[/color]

No, that's not CSS.
[color=blue]
> 2. does it have to contain <style> ... </style>?[/color]

No, that's not CSS.
[color=blue]
> 3. is <link> recognized within html page <style>?[/color]

What does the HTML 4.01 spec say?
[color=blue]
> 4. is the <link href> a relative url, i.e., just a file name, or must it be
> fully qualified?[/color]

It must be an URI.
[color=blue]
> finally could you post a working tag example that includes an external style
> sheet in your html? thanks.[/color]

foo.html:
<html>
<head>
<title>foo</title>
<link rel="stylesheet" type="text/css" href="foo.css">
</head>
<body>
<h1>foo</h1>
</body>
</html>

fo.css:
h1 {
color: #f00;
background-color: #fff;
}
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

  #3  
Old July 20th, 2005, 09:25 PM
Stan Brown
Guest
 
Posts: n/a
Default Re: link css declarations?

In article <CdYdb.22970$ev2.4400087@newssrv26.news.prodigy.co m> in
comp.infosystems.www.authoring.stylesheets, Dave Mausner
<net.ameritech@dmausner> wrote:[color=blue]
>the html 4.01 standard says i can use:
><link type="text/css" href=file-name>[/color]

Not quite. It's href="URL" not href=file-name. The style sheet can
be anywhere.
[color=blue]
>to include a style section. questions:
>
>1. does the external style sheet have to contain <html> ... </html>?[/color]

On the contrary, it must not.
[color=blue]
>2. does it have to contain <style> ... </style>?[/color]

On the contrary, it must not.
[color=blue]
>3. is <link> recognized within html page <style>?[/color]

No.
[color=blue]
>4. is the <link href> a relative url, i.e., just a file name, or must it be
>fully qualified?[/color]

It is a URL, which could be relative or absolute. You seem to think
that "relative URL" = "file name", and that is not true at all.
"../../abc/def/xyz.css" is a relative URL.
[color=blue]
>finally could you post a working tag example that includes an external style
>sheet in your html? thanks.[/color]

I can do better: I can show you the document you will wish you had
read before posting your questions:

http://www.htmlhelp.com/reference/css/style-html.html


--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
  #4  
Old July 20th, 2005, 09:25 PM
e n | c k m a
Guest
 
Posts: n/a
Default Re: link css declarations?

> fo.css:[color=blue]
> h1 {
> color: #f00;
> background-color: #fff;
> }[/color]

ouch... that's not gonna work :)

change "fo.css" to "foo.css" hehe ;)


  #5  
Old July 20th, 2005, 09:25 PM
Johannes Koch
Guest
 
Posts: n/a
Default Re: link css declarations?

e n | c k m a wrote:[color=blue][color=green]
>>fo.css:
>>h1 {
>> color: #f00;
>> background-color: #fff;
>>}[/color]
>
>
> ouch... that's not gonna work :)
>
> change "fo.css" to "foo.css" hehe ;)[/color]

Ooops, yes.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

  #6  
Old July 20th, 2005, 09:27 PM
Dave Mausner
Guest
 
Posts: n/a
Default Re: link css declarations?

"Stan Brown" <the_stan_brown@fastmail.fm> wrote in message
news:MPG.19e2bfa7964ecfb898b490@news.odyssey.net.. .[color=blue]
>
> I can do better: I can show you the document you will wish you had
> read before posting your questions:
>
> http://www.htmlhelp.com/reference/css/style-html.html
>[/color]

you are right, stan, i wish i had seen that one. it answers all my
questions. thanks.
--
dave mausner v.708-848-2775 c.312-wake-my-i


 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles