How to link to another bottom page? - html

This is my code
<a :href="page_4_state.data.dealerUrl" class="f-green" target="_blank">
<u>Searching for number</u>
Normally, It will link to another page.
But I want to link to the bottom of the another page.

I see your url dealer in the comment use a "href anchor", like this:
<a :href="page_4_state.data.dealerUrl+'#footer'" class="f-green" target="_blank">
<u>Searching for number</u>
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_href_anchor

Related

href link working for one item but not for another

I have an index.html that includes:
<li>
<a href="imprint.html#imprint-link">
<div class="main-menu-title">IMPRINT</div>
</a>
</li>
When I click on this item another html file (imprint.html) is loaded, but when I click on Home, which includes the following code to go back to index.html, it doesn't work!
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
What is wrong here?
Update 1: When hovering the mouse over the link I get:
try using this code :
<a href="index.html">
<div class="main-menu-title">HOME</div>
</a>
inplace of :
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
To answer your original question.
What's wrong here?
As a couple kind folks already commented and one person already provided a nice solution, clicking on your original link
href="#index-link"
while you are on the imprint.html page will not take you to your index.html page. Why? Because
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
is saying, "Take me to an element on the current page (imprint.html) that has an ID of 'index-link'. If there is no element with and ID set to index-link, on the imprint.html page, nothing will happen. And, you will stay on the current page because you didn't specify an URL outside of the current page, which is still imprint.html.
So, with that current setup, you will not get to see index.html.

web page navigation not working when link is clicked

I have a web page that is a table of contents and the page navigation is not working. Here is the html:
<a name="top_of_page">Create Account</a>
top
When i click on the top of page link nothing happens. Am i doing something wrong? Thanks for any help in advance.
name is not the correct attribute to use. Use id instead.
<a id="top_of_page">Create Account</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
top

URL from one page to another page + region

I have a page with a master header and need to go from a second page back to the 'index' to a region. This will get me to the page but I cannot seem to get to the region which is #about.
<a runat="server" href="~Index.aspx" class="smoothScroll">
About
</a>
First you should give the about region an id, and then link to that page and at the end of it add #(our id) like this:
<div id="about"></div>
and in your link:
<a runat="server" href="~/Index.aspx#about" class="smoothScroll">
About
</a>

Problems displaying facebook share image using image parameter of share url

I am using the facebook share url but having trouble displaying the image parameter of the url, can anyone advise where I may be going wrong with this?
HTML
<a title="Share this on Facebook"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]='http://www.test.com'
&p[images][0]='http://www.meandmrsjoneshotel.com/wp-content/themes/child-theme/img/fb-thumbs/home.png'
&p[title]='This is the title'
&p[summary]='This is the share description'"
target="_blank" class="fb ir">
Share this page on Facebook
</a>​
JS Fiddle http://jsfiddle.net/pUMZb/
Thanks
try to remove the apostrophes. Your code should be look like this
<a title="Share this on Facebook"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]='http://www.test.com'
&p[images][0]=http://www.meandmrsjoneshotel.com/wp-content/themes/child-theme/img/fb-thumbs/home.png
&p[title]='This is the title'
&p[summary]='This is the share description'"
target="_blank" class="fb ir">
Share this page on Facebook
</a>​

How to use an HTML # anchor in a dynamic URL

I want to link to a section of a dynamic page using the # anchor. Something like this:
<a href=page.php?id=3#section-name>LINK</a>
It didn't work. What is the right way to do it?
I'm not using a direct link, but a redirect like header("Location:page.php?id=3#section-name") from another script.
I have a section named section-name in file page.php. I guess page.php has a problem figuring out the value of the id to process (3 or 3#section-name). I am redirected to page.php which has its content repeated vertically.
You've only presented half of your code so I can only give a sample of the proper way to do it:
<body>
<a name="top"> </a>
<a href="#top">
Go To Top Of Page
</a>
</body>
When using anchor tags, you can target an element by its ID. Browsers will look for the ID before it looks for the name attribute when the link refers to such.
<a href="#section-name>LINK</a> will go directly to <div id="section-name"> if it exists.
Here's an example
Read: HTML Anchors with 'name' or 'id'?
A typical anchor tag works as follows:
A href link tag is written like so:
Jump to a001
See the #a001 above? That is referencing an id in the HTML page, and it will jump to it if you click this link.
To provide an example of how this id that we would jump to might look on a page, look below.
<li id="a001">text here</li>
Reference