Hi guys, im having a problem which i have tried to solve myself for the past two hours but cant figure it out, ive only just started with html so im sorry if its a dumb question, anyway here goes the code below is what i am using
<?xml version= "1.0"ecoding = "UTF - 8"?>
<DOCTYPE html PUBLIC "- //WC3//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<h1> Welcome To The Shop </h1>
<p>
bla bla bla text.
</p>
<a href="shop.htm"> Shop </a>
<a href=http://www.shop.com> The world's Largest shop </a>
</body>
</html>
when it is like it is above i can see the main body text, but whenever i add another link like the code below you cant see the second link, can any1 please help?
<?xml version= "1.0"ecoding = "UTF - 8"?>
<DOCTYPE html PUBLIC "- //WC3//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Use HTML Doctype and notation, not XHTML. XHTML was made to handle XML objects within HTML, which I doubt it is your case, and it has some strict rules. HTML 4.01 is enough.
Use HTML Doctype and notation, not XHTML. XHTML was made to handle XML objects within HTML, which I doubt it is your case, and it has some strict rules. HTML 4.01 is enough.
mean? does it mean change the coding at the top just to say <html>? rather than all the xml stuff? if so do i delete all the xml stuff as i got it out of sams teach yourself html and css in 24 hours book.
heres the new and updated code, still the link to the 'pokershop' doesnt work, sorry to keep bothering you and thanks for the help so far, can you see why it isnt showing up? p.s ive tried shortening the link to pokershop.htm as its in the same folder but it still doesnt work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title> The One Stop Poker Shop </title>
</head>
<body style="background-color:#00cc00;">
<h1> Welcome To The One Stop Poker Shop </h1>
<p>
The One Stop Poker Shop is the largest private poker network.
We supply top of the range poker accessories for that tournament
poker experience in your own home. Whether your playing a home
game vs a mate or two or playing a home game vs a group of individuals
the best way to impress them is with professional poker accessories and
we've got it all lined up for you in our poker shop! Click below to check out our amazing range
of poker goodies from top of the range poker tables to top of the range card shufflers!
</p>
<a href="C:\Users\Dan and Ash\Desktop\Sams HTML and CSS\pokershop"> Poker Shop </a>
<a href="http://www.pokerstars.com"> The world's Largest Online Poker Network </a>
Two things, one put a <br> in between the link to new line it.
Second if your using a local file on windows run it like this:
Code:
<a href="file:///C:/Users/Dan and Ash/Desktop/Sams HTML and CSS/pokershop"> Poker Shop </a>
__________________
"FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
█ █ http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
█ █ http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
█ █ http://www.microtronix-tech.com -- Web design and programming
Two things:
1) Why are you using a Transitional DTD? This is a new document. You should only ever use Strict.
2) Why do you keep putting spaces between tags and text? It's weird.
Actually I have a couple more:
3) You shouldn't really use inline CSS. It really defeats the whole point in it. Use a style block in development if you really like all your code on one page, but you should move it to an external stylesheet before putting it live.
4) If you can, use a relative path. This means you don't have to update all your links when you post your pages online. In the end, it's a lot cleaner. What jfreak gave you may actually work, but spaces are invalid in URIs.
Hi apost, thanks for your feedback here are the answers to your questions,
Quote:
1) Why are you using a Transitional DTD? This is a new document. You should only ever use Strict.
Im using transitional DTD because im not sure of the excaxt document type i should be using, could you show me the exact code i should put at the head of each document? i was using the latest xhtml document type as sams teach yourself css and html in 24 hours said to do so but others have told me not to, what should i actually be doing?
Quote:
2) Why do you keep putting spaces between tags and text? It's weird.
The book told me to keep things 'spacey' to make it easier to read, but i wont from now on if its wierd lol. sorry didnt realise it was wrong.
Quote:
3) You shouldn't really use inline CSS. It really defeats the whole point in it. Use a style block in development if you really like all your code on one page, but you should move it to an external stylesheet before putting it live.
Could you please tell me what inline css is? are there more than one type of css? i have no idea, if thats a stupid question im sorry
Quote:
4) If you can, use a relative path. This means you don't have to update all your links when you post your pages online. In the end, it's a lot cleaner. What jfreak gave you may actually work, but spaces are invalid in URIs.
I will try to use relative paths where possible,
thanks for all your input i really do appreciate it
<html>
<head>
<style type="text/css">
p {color: white; }
body {background-color: black; }
</style>
</head>
It's a style block for everything inside the head tag of your document. But even that defeats the purpose and I think apos would agree with me use external, that way it can be once written for multiple pages:
And I didn't get into the relative path thing because I kind of thought it was mute since he was using a Windows directory path on a windows machine, I didn't really think he was going to run it like that publicly, I think I might have been wrong.
Yes always relative or if you can run it with the http url, but never use the local directory path, ever. And yes spaces are invalid, that's why you see a lot of url's with "%20" in them. But again thought it might be mute since the way he was running it anyways.
I go over this time and time again with clients who upload pictures, why can't I have spaces and the wierd names I call my pictures, ha ha, it's fun ha ha.
__________________
"FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
█ █ http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
█ █ http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
█ █ http://www.microtronix-tech.com -- Web design and programming
thanks jfreak that post helped alot, im using the links you have supplied now in an attempt to get a better grasp on things, i've thanked you officially through the 'thank user' button.
Also jfreak, would you mind swapping emails as i have found your advice very helpful and i could possibly email you with future questions should i have any? If so my email is dj.cassidy@yahoo.com
Also, jfreak (offtopic), the word you're looking for is "moot" :P
Ha ha ha ha thank you I was scratching my head trying to remember how to spell that stupid word!! ha ha, it was early what do you expect
__________________
"FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
█ █ http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
█ █ http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
█ █ http://www.microtronix-tech.com -- Web design and programming