473,508 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 20 '05 #1
5 2500
Dave Mausner wrote:
the html 4.01 standard says i can use:
<link type="text/css" href=file-name>
No, it doesn't. href must be an URI.
to include a style section.
to include external style sheets.
questions:

1. does the external style sheet have to contain <html> ... </html>?
No, that's not CSS.
2. does it have to contain <style> ... </style>?
No, that's not CSS.
3. is <link> recognized within html page <style>?
What does the HTML 4.01 spec say?
4. is the <link href> a relative url, i.e., just a file name, or must it be
fully qualified?
It must be an URI.
finally could you post a working tag example that includes an external style
sheet in your html? thanks.


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.)

Jul 20 '05 #2
In article <Cd*********************@newssrv26.news.prodigy.co m> in
comp.infosystems.www.authoring.stylesheets, Dave Mausner
<net.ameritech@dmausner> wrote:
the html 4.01 standard says i can use:
<link type="text/css" href=file-name>
Not quite. It's href="URL" not href=file-name. The style sheet can
be anywhere.
to include a style section. questions:

1. does the external style sheet have to contain <html> ... </html>?
On the contrary, it must not.
2. does it have to contain <style> ... </style>?
On the contrary, it must not.
3. is <link> recognized within html page <style>?
No.
4. is the <link href> a relative url, i.e., just a file name, or must it be
fully qualified?
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.
finally could you post a working tag example that includes an external style
sheet in your html? thanks.


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/
Jul 20 '05 #3
> fo.css:
h1 {
color: #f00;
background-color: #fff;
}


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

change "fo.css" to "foo.css" hehe ;)
Jul 20 '05 #4
e n | c k m a wrote:
fo.css:
h1 {
color: #f00;
background-color: #fff;
}

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

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


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

Jul 20 '05 #5
"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP************************@news.odyssey.net.. .

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


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
Jul 20 '05 #6

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

Similar topics

9
1338
by: Michael Tobis | last post by:
Summary of my understanding of a recent interesting thread: General usage has "declaration" meaning "statement which does not generate executable bytecode but merely affects the compiler". My...
33
27703
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a...
4
1912
by: Thomas Mlynarczyk | last post by:
Hi, I just ran into some problems when I tried to "style" the <a> elements of a page. Basically, I have something like this: <div id="left"> <div id="menu"> <a href="bla">Bla</a> </div>...
2
1819
by: Ricky Corsi | last post by:
hello everybody, I have an application that uses a 3D engine library compiled as a static library called EnRG.lib. My own code is normally compiled against the MS Visual C implementation of the...
134
7747
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
6
3758
by: JimO | last post by:
Is there any way to reset a link's state. In other words reset a visited link to an unvisited link. I guess the question I'm asking would be how do you programatically search and clear the...
10
9484
by: Gary Hughes | last post by:
I'm getting the following error when attempting to link a managed C++ dll. I can't find any reference to these errors with google. Can anyone help? I've included the class definition causing the...
8
3280
by: yossi.kreinin | last post by:
Hi! When are multiple definitions of global variables with the same name considered legal in C, and how is it different from C++? It appears that in terms of assembly language, some C...
2
1997
by: Guido Belligoi | last post by:
Hi, I compiled 2 simple source-files with cl -c main.cpp and cl -c test.c. test.c contains just a simple function, which is declared in test.h. test.h is included in test.c and in main.cpp....
0
7379
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...
1
7038
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...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3192
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...
0
1550
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 ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
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...

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.