473,656 Members | 2,777 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 2517
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************ *********@newss rv26.news.prodi gy.com> in
comp.infosystem s.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
1345
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 assertion that decorator syntax is "declarative" is therefore formally false. The common assertion that "Python is 100% executable" is an exageration, but not because of the introduction of decorator syntax. The "global" statement, however is not...
33
27734
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 different border color for a mouse hover effect over the image. With Mozilla, I can simply specify img:hover {...}, but IE allows hover only for <a>. So now I'm looking for a way to set the border for my <a> element rather than the <img>, but...
4
1917
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> <a href="foo">Bar</a>
2
1831
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 stl, and everything works fine. I wanted to try to link the same code against the stlport. but I get a lot of linking errors (i report one of those at the end of the message) and I don't understand why... could it be because the EnRG lib is...
134
7857
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 means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
6
3770
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 history of a particular page?
10
9508
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 errors below. Everything compiles fine and all the types are defined, it appears that the template type itga::order_collection::iterator is causing the trouble. Gary.
8
3294
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 definitions are translated to "weak" symbols, in which case multiple definitions are merged by the linker, while some become "normal" symbols, triggering linker errors in case they are defined more then once. Is it true that in C++, multiple definitions...
2
2006
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. When I try to link the objects with link main.cpp test.c -out:prog.exe I get the error: "main.obj : error LNK2019: unresolved external Symbol "int __cdecl greater(int,int)" (?greater@@YAHHH@Z), called in function _main prog.exe : fatal error...
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8297
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
8717
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
8498
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
7311
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5629
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1600
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.