HTML links not working - html

I created my first website uploading the first two pages including the first and main page and then a second page that the first page links to. Before doing so, a link that when clicked on, takes me correctly from my main page to a second page worked. After uploading it on 000webhost.com it no longer worked. Meaning, I can view my main page but when I click on the link that should take me to my second page, it doesn't do anything. Here is the code that was and is still included in my main page for the link that should take me to my second page. I have a feeling that it has something to do with the protocol and that I have to make changes to it but not sure what changes to correctly make so the link will work. I used a sub domain at 000webhost.com not my own. Here is the code that was and is on my main page:
<li>Noah's First Day</li>

The link points to a file on your computer (note the file:// prefix). The best practice is usually to have links to your own pages in relative form. So, for example, assuming you uploaded all the files to the same directory, just use the filename itself:
<li>Noah's First Day</li>

Related

What can cause Anchor Links to reload the page?

Recently, I've been working on a WordPress website powered by the Divi theme and builder. Some of the pages have a menu with the URLs set to ID's of certain sections of the page (anchor links) but when clicked, the page refreshes and then scrolls to the relevant section.
What would cause a page to refresh when an anchor link is clicked? I'm baffled!
I've tried changing the URLs (to the below) but still have the same problem.
https://www.domain.co.uk/tables/#breakpoint-one
https://www.domain.co.uk/tables#breakpoint-one
In static HTML, coding something like this would take a matter of minutes so I cannot understand why the page refresh occurs.
Is the refreshing ocurring only the first time you click on an anchored link? or does it happen every time.
Perhaps you have POST data present (like you arrived on the page after submitting a form). I think the behaviour you describe matches that scenario.

I want Href to take me to a part of another webpage

]2I have a website with 3 pages and in each of one them is a button which should take me to a bottom part of the main page.
index.html is the main page and #r is for it to take me to the bottom part. When i click the button on that page it works perfectly, but when i do it on one of the two other pages it redirects me to the main page and the part i wanted but without all the css classes.
How can i fix this? href="./index.html/#r"
I have tried different approaches but none of them seems to work.
It's not href="./index.html/#r", (i.e. #r is not a separate file and index-html is not a directory in the filepath), but the anchor is directly appended to the filename of the page, like href="./index.html#r"
It is quite simple as you just have to specify a name or id to that part of the main web page, and then you can link it with other web pages by just putting both values(name of the page along with that part of its body) in "href" attribute.
For example-
text
here page.html is the name of webpage and #anchor is the name or id of that specified part
hoping it will help you!!
greetings,
Om Chaudhary

Automatically redirect from '/folder' to '/folder/index.html' with Hakyll or another issue with relative links

I want to implement static HTML website with multiple languages using Hakyll framework. I didn't come up with better solution than just put default language under website.com route and any other custom language at website.com/en route. Because I'm using static HTML and having multiple languages I should have multiple versions of every page, for example about.html. Such pages are generated automatically, so that's not a problem. But currently I have a problem with jumping those pages...
I have such link in my website.com/index.html:
<a href=about.html>
When I open this link from website.com/en I want to jump to website.com/en/about.html instead of website.com/about.html. But in reality I'm jumping from website.com/en to website.com/about.html. If I instead jump from website.com/en/index.html I go to website.com/en/about.html as I want. So I'm inserested in one of two possible solutions:
When I go to website.com/en I want to be redirected to website.com/en/index.html. I can see content of index.html from website.com/en but somehow I can't jump to relative link :(
Replace href=about.html with something more smart so I can automatically go folder/about.html from any folder.
Any help appreciated!

How to Get ajax to stop appending a hashed location to a URL

I'm trying to determine where in my set of JavaScript files would I edit to make the urls of my site stop being appended with a "#home" to every portion of the site, or specific pages. I thought it was in the "deeplinking:" value of Pretty Photo, but then I realized that wouldn't make sense for that js to manipulate a URL in a normal page (a gallery, yes, and I have another site where that DID stop giving URLs to images in the Pretty Photo gallery, but not for regular page content). I cannot seem to locate it in the fw_scripts.js - which controls the majority of the site. I also tried to inspect element in FF to see what event handlers might be on the HTML tag, but to no avail.
Where would I find the javascript to edit to make the url's of any index.html file in a specific folder STOP appending a #home tag?
See what I mean here http://clients.runningh20.com/mf
Many thanks in advance.

I linked a text to a page but it did not work

I linked a text in view page to a function but it did not work I do not know what is the problem. It worked in one page but note in another page I mean it did not work for two Previous pages
back
You need relative URLs that start from the root of your site: e.g.:
back