These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:04 pm Advanced search

Document linking Issue

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

Document linking Issue

Postby dbyrns » Wed Dec 12, 2012 2:01 pm

I am trying to link my html5 documents for my class final and I can not get them to link I am using:

<a href="LLZamenhof">Learn about the creator</a> But this will not link them I open my home page and clik the link I put at the bottom and it will not take me to the page and everthing is in the same folder.
dbyrns
<h6>
 
Posts: 4
Joined: Tue Nov 27, 2012 6:52 pm

Re: Document linking Issue

Postby JAB Creations » Wed Dec 12, 2012 9:26 pm

Use the base element which should be in your (X)HTML before any link and script elements...

Code: Select all
<head>
<base href="http://www.example.com/" />
<link />
<script />
</head>


All relative links will have their URLs added to the end of the base element's href attribute's value.

Using...

Code: Select all
<a href="LLZamenhof">link</a>


Will generate...

http://www.example.com/LLZamenhof


...in example.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Document linking Issue

Postby dbyrns » Wed Dec 12, 2012 10:56 pm

I don't I beleive I have a www. for the documents, because I am doing them completly on my pc and then uploading the file as a compressed file. to my school server. I have two pages made and they are labeled esperanto.html and then the LLZamenhof.html should the esperanto.html which is my home page actualy be labled index.html?

I know these are probly infant questions being that you guys are mostly pro's but this looked like the best place to learn HTML programing along with my collage class's I am taking.
dbyrns
<h6>
 
Posts: 4
Joined: Tue Nov 27, 2012 6:52 pm

Re: Document linking Issue

Postby JAB Creations » Wed Dec 12, 2012 11:04 pm

If you want clean URLs and you're just using regular HTML files then...

http://www.example.com/about/index.html


...can simply be accessed at...

http://www.example.com/about/


...since index files don't require the file names inside of the directory/folder. So choose a clean/short directory name, create a folder and then put the index.html file there.

The same thing for the front page/root page....

http://www.example.com/index.html


...can simply be accessed at...

http://www.example.com/


-------------------

It sounds like you're simply uploading the files to be viewed locally as in a teacher simply downloads them from someplace such as email and then opens it from their computer directly. If that is the case then you need to ensure that the links are cAsE seNSiTive. "Bob" and "bob" are two completely unrelated strings of text with no relation to each other as far as a computer is concerned.

When naming files for a website stick to basic rules. Use all lowercase letters and only use dashes (not underscores (_)) to separate words such as "about-me.html" for example.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Document linking Issue

Postby dbyrns » Fri Dec 14, 2012 1:35 am

Ok I looked at my code and used TIDY and is said my code looks like HTML 3.2?
The code at the bottom is my link to the second page and it wont work.
I have included my other code for my second page.
is this compatapal code?
this is my code for my first page:

Code: Select all
<!DOCTYPE html>

<html>
<head>
<title>Why Learn Esperanto</title>
<link rel="stylesheet" type="text/css" href="Final.css">

</head>
<body>
<h1>Esperanto, what is it</h1>
<p><img src="Zamenhof.gif" alt="L.L.Zamenhof" width="220" height="309"></p>
<p>
Esperanto is the most widely spoken constructed international auxiliary language. Its name derives from Doktoro Esperanto ("Esperanto" translates as "one who hopes"), the pseudonym under which L. L. Zamenhof published the first book detailing Esperanto, the Unua Libro, on July 26, 1887. Zamenhof's goal was to create an easy-to-learn and politically neutral language that transcends nationality and would foster peace and international understanding between people with different regional and/or national languages.</p>
<p>Estimates of Esperanto speakers range from 10,000 to 2,000,000 active or fluent speakers, as well as perhaps a thousand native speakers, that is, people who learned Esperanto from birth as one of their native languages. Esperanto has a notable presence in over a hundred countries. Usage is highest in Europe, East Asia, and South America. The first World Congress of Esperanto was organized in France in 1905. Since then congresses have been held in various countries every year with the exception of years in which there were world wars.</p> <p>Although no country has adopted Esperanto officially, Esperanto was recommended by the French Academy of Sciences in 1921 and recognized in 1954 by UNESCO (which later, in 1985, also recommended it to its member states). In 2007 Esperanto was the 32nd language that adhered to the "Common European Framework of Reference for Languages: Learning, Teaching, Assessment (CEFR)". Esperanto is currently the language of instruction of the International Academy of Sciences in San Marino.There is evidence that learning Esperanto may provide a superior foundation for learning languages in general, and some primary schools teach it as preparation for learning other foreign languages. On February 22, 2012, Google Translate added Esperanto as its 64th language</p>

<h1>How Esperanto Came to be</h1>

<p>The constructed international auxiliary language Esperanto was developed in the 1870s and 80s by L. L. Zamenhof, and first published in 1887. The number of speakers has grown gradually over time, although it has not had much support from governments and international bodies, and has sometimes been outlawed or otherwise suppressed.</p>
<p>Zamenhof would later say that he had dreamed of a world language since he was a child. At first he considered a revival of Latin, but after learning it in school he decided it was too complicated to be a common means of international communication. When he learned English, he realised that verb conjugations were unnecessary, and that grammatical systems could be much simpler than he had expected. He then realised that a judicious use of affixes could greatly decrease the number of root words needed for communication. He chose to take his vocabulary from Romance and Germanic, the languages that were most widely taught in schools around the world and would therefore be recognisable to the largest number of people.</p>
<p>Zamenhof taught an early version of the language to his high-school classmates. Then, for several years, he worked on translations and poetry to refine his creation. In 1895 he wrote, "I worked for six years perfecting and testing the language, even though it had seemed to me in 1878 that it was already completely ready." When he was ready to publish, the Czarist censors would not allow it. Stymied, he spent his time in translating works such as the Bible and Shakespeare. This enforced delay led to continued improvement. In July 1887 he published his Unua Libro (First Book), a basic introduction to the language. This was essentially the language spoken today.</p>

<a href="llzamenhof.html" >llzamenhof</a>

</body>
</html>



code for page two:

Code: Select all
<!DOCTYPE html>

<html>
<head>
<title>L.L Zamenhof</title>
<link rel="stylesheet" type="text/css" href="Final.css">
</head>
<body>
<h1>About the creator</h1>
<p>
L.L. Zamenhof, in full Ludwik Lejzer Zamenhof, pseudonym Doktoro Esperanto (Esperanto: “Doctor Hopeful”)   (born December 15, 1859, Bialystok, Poland, Russian Empire [now in Poland]—died April 14, 1917, Warsaw), Polish physician and oculist who created the most important of the international artificial languages—Esperanto.
A Jew whose family spoke Russian and lived in an environment of racial and national conflict on the Polish-Russian borderland, Zamenhof dedicated himself to promoting tolerance, mainly through the development of an international language. After years of experiment in devising such a tongue, working under the pseudonym of Doktoro Esperanto, he published an expository textbook, Lingvo Internacia (1887; Dr. Esperanto’s International Language). His pseudonym, Esperanto (“[one] who hopes”), was to become the language’s name.
In addition to continuing his medical career, Zamenhof worked to develop Esperanto and organize its adherents. The first Esperanto magazine appeared in 1889, the beginnings of formal organization in 1893. With some literary and linguistic skill, Zamenhof developed and tested his new language by translating a large number of works, including the Old Testament, Hamlet, Hans Christian Andersen’s Fairy Tales, and plays of Molière, Goethe, and Nikolay Gogol. At the first international Esperanto congress at Boulogne, France (1905), and at successive annual congresses in various European cities, Zamenhof delivered a number of memorable addresses, but he renounced formal leadership of the Esperanto movement at Kraków, Poland, in 1912. His Fundamento de Esperanto (1905; 17th ed., 1979; “Basis of Esperanto”) established the principles of Esperanto structure and formation.</p>

<h1>Esperanto</h1>
<p>Zamenhof's reputation is due to the fact that he is the founder of Esperanto, the new universal language which has taken the place of Volapük. The idea of an international form of speech was suggested to him by the polyglot character of his native town; four different languages were spoken there, and to this fact he attributed the constant dissensions and misunderstandings which disturbed the city. In the gymnasium and at the university he threw himself heart and soul into the study of languages while pursuing his medical work; but the idea of Esperanto did not dawn on him at once. At one time he entertained the idea of mathematical construction, and later the claim of the dead languages, especially Hebrew, appealed to him. For three years he worked at Yiddish and compiled a grammar which is still unpublished, hoping that, since Judæo-German was a modern tongue in use among millions of his coreligionists, it might be universalized. Discarding this idea in its turn, he finally reached the conclusion that no language could ever become a universal medium of communication if it identified itself with any individual nationality or country; it must be neutral. In 1878 he succeeded in building up such a language on the basis of the Romance and Teutonic roots of modern European tongues, but it was not until 1887 that, after several unsuccessful attempts to find a publisher, he gave to the world his first brochure, published anonymously under the pen-name of "Doktoro Esperanto" (Dr. Hopeful).</p>
<p><img src="esperanto.gif" alt="esperanto" width="220" height="309"></p>
</body>
</html>



And code for my CSS:


Code: Select all
body
{
    Background-color : black;
    Font-family : sans-serif;
    Font-style : normal;
    Font-size : medium;
    Font : Times New Roman;
    Color : lime;
    Text-align : left;
    Text-indent : 5px;
    Margin-right : 50px;
    Line-height : normal;
}
h1
{
    Font-family : sans-serif;
    Font-size : 40px;
    Font : Courier , Verdana;
    Color : fuchsia;
    Font-style : normal;
}
a:link
{
    Color : yellow;
}
a:visited
{
    Color : aqua;
}
a:active
{
}
dbyrns
<h6>
 
Posts: 4
Joined: Tue Nov 27, 2012 6:52 pm

Re: Document linking Issue

Postby zcorpan » Fri Dec 14, 2012 9:56 am

Don't use Tidy. It hasn't been updated to support modern HTML, I believe.

If you want to find mistakes in your HTML, use http://validator.nu/
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Document linking Issue

Postby dbyrns » Fri Dec 14, 2012 11:18 am

zcorpan wrote:Don't use Tidy. It hasn't been updated to support modern HTML, I believe.

If you want to find mistakes in your HTML, use http://validator.nu/


Wow know that is awsome.thanks a lot for letting me know about this validator.
dbyrns
<h6>
 
Posts: 4
Joined: Tue Nov 27, 2012 6:52 pm

Re: Document linking Issue

Postby JAB Creations » Fri Dec 14, 2012 6:30 pm

Unfortunately that validator does not correctly validate all valid pages...

http://validator.nu/?doc=http%3A%2F%2Fw ... ons.com%2F

Stick to using the W3C validator, in example...

http://validator.w3.org/check?verbose=1 ... ons.com%2F

Tidy seems to have been updated as late as 2008? Likely it will not be very compatible with (X)HTML 5 however...

http://tidy.sourceforge.net/

If you rename your files with a .xhtml extension then they will be served as application/xhtml+xml; use Firefox or Opera and invalid code will break the page, other browsers will only stop parsing when they encounter an error and therefore are not helpful. Use this to better understand how to code better stricter code.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Document linking Issue

Postby zcorpan » Mon Dec 17, 2012 11:46 am

JAB Creations wrote:Unfortunately that validator does not correctly validate all valid pages...

http://validator.nu/?doc=http%3A%2F%2Fw ... ons.com%2F

If you want to validate against an obsolete version of XHTML, that's supported but requires you to manually select it in a dropdown.

http://validator.nu/?doc=http%3A%2F%2Fw ... source=yes

BTW it looks like you have some encoding issues there.

JAB Creations wrote:Stick to using the W3C validator, in example...

http://validator.w3.org/check?verbose=1 ... ons.com%2F


Its validation of legacy XHTML is DTD-based and does fewer checks compared to v.nu. For instance, it does not check that URLs in attributes are valid.

JAB Creations wrote:Tidy seems to have been updated as late as 2008? Likely it will not be very compatible with (X)HTML 5 however...

I rest my case.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 1 guest