I wanted to make a website that would help people study better. It's still pretty basic since I don't actually know enough JavaScript to make it cool. I wanted to link one page to another through buttons, but I have no luck in doing so. I use a Chromebook and I had seen that the same link you'd use on a computer using windows isn't the same.
Here is what I did, but nothing seems to work. It is saved in the folder, Websites and it's named About.html
HTML code
<ul>
<li>Home|</li>
<li>About|</li>
<li>Schools|</li>
<li>Submit Notes|</li>
</ul>
Make sure your index.html page (start page) is located in the same folder as your About.html file. If it is, your code would be a follows:
<ul>
<li>Home|</li>
<li>About|</li>
<li>Schools|</li>
<li>Submit Notes|</li>
</ul>
Related
Essentially I am trying to link to my my GitHub Pages index.html file to the other files in the repository to make a multi page website.
The URL is correct, I have tried a bunch of ways and I am simply getting no where.
The main branch is called home, in it is the index.html file, as well as the other files, see below:
Main Branch is called home
The links inside the html file are:
<li class="masthead__menu-item">
Research
</li>
The file "research" is inside the home branch. I have tried naming it "research.html" I have tried deleteing the "home" from the above link so it directly links to research, see below:
<li class="masthead__menu-item">
Research
</li>
Nothing seems to work. What am I doing wrong?
After hours and hours of trying things, I finally got it to work:
<li class="masthead__menu-item">
Research
</li>
What I did was to get rid of the "home" and make the page an html file.
Thank you iamabdm and minwka!
Looking at the screenshot and the html you provided, I don't see any *.html extensions following the name of the files you're trying to link to.
For example: try renaming the file "research" to "research.html"
If the file is a html file then the problem is with the address of the URL i.e. https://xxx.github.io/research/ in Research.The last slash is causing the problem. Remove the last slash from the address, i.e. https://xxx.github.io/research and it will be Research.
Is this possible. From what I understand, absolute paths are most commonly used with links to a website. I am not using a web server, my HTML file is local and needs to be linked to another HTML file using an absolute link. These were my directions and any clarity is much appreciated, as I don't fully understand how I would do this yet. Thanks.
Directions:
Create a navigation (nav) menu pointing to the two HTML pages in the menu directory
-The link to the menu page should be relative and point to the entrees section
-The link to the health-warning page should be absolute.
It all depends on where the html file lives. If you're doing this locally then it'll depend on where the html file you're referencing is on your computer. If you're on windows that could be C:\Users\yourusername\projects\whateverfile.html while on Mac or Linux it would be file:///home/yourusername/projects/whateverfile.html. Those are absolute paths. A relative path is where the file is in relation to the html you're adding the link to. An example for your assignment could look like.
<nav>
<ul>
<li>Menu Page</li>
<li>Health Warning</li>
</ul>
</nav>
Yes this is possible. For a local absolute link, you would expect to see your absolute link start with C:// if you are on a Windows machine.
I have the following website:
http://luscoefusco13.es
I would like to know how to put a link that redirects to the main page, if I have three files, index.html, main.html and top.html?. It has frames, that is the difference between the question asked in the example of similar case.
Use simply /, as in Link text - this will always link to the root of your website, regardless of the visitor's current location on your site, or the site's domain name.
With target="framename"
<ul>
<li>A frame</li>
<li>B frame</li>
This is the site where
I have it from:
http://www.tagindex.net/html/frame/a_target.html
Using has all of the issues on anchor-tags that were described in this question on base tags making it hard to use on my site.
I have a navigation menu in my site which references different parts of my site
for example
main/
|_index.html
|_section1/
|_1a.html
|_1b.html
and the navigation section on each page looks like
<div id="nav">
<ul>
<li>home</li>
<li>1a</li>
<li>1b</li>
</ul>
</div>
This works fine for all the pages on in the main folder but for pretty obvious reasons fails when I'm viewing a page in the section1 folder. I can't use <base> because I have a large number of anchors in documents (and I'm using markdown so I cant change the reference format easily).
I'm concerned that if I use absolute references on all my pages, when I upload this site to a server it will be a huge amount of work to replace the absolute reference on each page with a different one.
In addition main is a few levels down in my /home/ directory and I would prefer not to have to type a long path-name each time I refer to something if possible
I guess if I was pushed I could use sed to change all instances of the absolute path with something else but I wondered if there was an easier, obvious way of dealing with this in html that I'm missing. thanks
You can make use of htaccess, if you can't use <base> in HTML
Okay so i'm learning html right now and soon css. In my html coding I have a section like this for navigation:
<div id="header">
<h1>Guild Wars 2 Fanbase</h1>
<ol id="navigation">
<li>Home</li>
<li>Facts</li>
<li>Gallery</li>
<li>Coding
<ul><li>Lines</li>
<li>Comment Lines</li>
</ul>
</li>
</ol></div>
Now when I open up this .html file this is all layed out the way I want it too look (the mark up that is). My question is this, when I click on a link on this site (this site being this code) I get an a error saying this webpage is not found, but of course. But how do I create it so I can have the web pages working together? I'm not sure how to word it correctly. Like, do I create another .html file in the same directory so somehow when I click the link it reads from the second .html file?
If you not sure what I'm asking, just let me know and I'll try to be more specific. Thank you for your help (:
excuse my mistakes in grammar, not the worlds best in English, trying my best (:
As mentioned by #Craig T your href's should point to another page.
<li>Home</li>
<li>Facts</li>
These are relative to your existing website where '/' is the topmost page.
'/facts' is actually refering to a directory called facts relative to '/'
However, they need not point to just another html page.
They can also point to another website.
e.g.
<li>Links</li>
Or a specific page at other site:
<li>Something</li>
In the html code you provided the URL's point to directories. When a specific file or resource is not provided i.e. it doesn't end in something like /page/yourpage.html then it's up to the webserver to decide how to handle it. They will usually have rules to determine this.
e.g. the apache webserver is often configured to return the file index.html in the requested directory.
So these:
<li>Home</li>
<li>Facts</li>
<li>Gallery</li>
<li>Coding
<ul><li>Lines</li>
<li>Comment Lines</li>
Are equivalent to these:
<li>Home</li>
<li>Facts</li>
<li>Gallery</li>
<li>Coding
<ul><li>Lines</li>
<li>Comment Lines</li>
On some setups instead of the default being index.html it's index.php or index.asp.
Actually most go by an order of priority.
e.g. try index.php first and if not available try index.html
I hope that's clear.
In the context of this question your href's should point to another html page.
For example:
<li>Facts</li>
You would need to create a facts.html page in the root directory of your site.
Here's an awesome link someone gave me once, about URLs: http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/
-- oops was meant to be a comment, sorry :P