Button to PDF on HTML - html

Is there any way to make a button linked to a document (PDF) on HTML?
As additional data, this button would be an image.
PS: I am using Notepad++.
Thank you.

Yes. Simply use a regular link:
<a href="http://example.com/myPDF.pdf">
<img src="http://example.com/myImage.jpg">
</a>
And if you want it to open in a new window as to not divert traffic...
<a href="http://example.com/myPDF.pdf" target="_blank">
<img src="http://example.com/myImage.jpg">
</a>
Also, I should mention that the text editor you use is irrelevant in this question, because Notepad++ is just want you use to write the HTML. It's not specific to any one editor.

Something like this
<img src="yourImage.jpg"></img>
And yes this also works with Notepad++ ;-)

If you have a button-looking image foo.png and the PDF document has the URL hyps.pdf and the title “Hypsology”, you can use a link like the following:
<img alt="Hypsology (PDF)" src="foo.png">
What happens when a user clicks on the image depends on his browser and its settings.

Related

How to pick the page icon tab and put as icon link in my body page Html, Css

I was doing a page with a list of sites I need to visit daily, such as exercise to learn Html, CSS. I would like to know if it is possible to create a link with a page icon that is in the upper tab of the browser (chrome).
Ex: I want to list StackOverflow on my site. So I create a link and for the icon, I want to use the image that is on the tab of the page itself, as in this:
You can use:
https://plus.google.com/_/favicon?domain=www.yourlink.com
example
<a href="">
<img src="https://plus.google.com/_/favicon?domain=www.stackoverflow.com"> Stackoverflow
</a>
If I'm correctly getting what you want, you'd need to either have a local copy or link to the sites' favicon, like so:
<img src="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico" />

Edit code of page on Wordpress

I want to edit the HTML code of my Wordpress page. Exactly, I want to create a page, not posts, in my Wordpress page, where I want expose my CV and insert my photo which will changes when I pass the mouse above of it.
I tried to search something about this and i found this. In this reference, the writer speaks about the code modification, but isn't my particular case.
When I try to edit the code in the Wordpress page, I can't use some codes. For example: <a>, <div> ...
I want to use something like this:
<div class="authorimage">
<a href="https://www.codesyntax.com/eu/bloga/author/lfernandez">
<img class="mainimage" src="https://www.codesyntax.com/lfernandez.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
<img class="hoverimage" src="https://www.codesyntax.com/lfernandezhover.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
</a>
</div>
But in the published page the following appears:
<img class="mainimage" src="https://www.codesyntax.com/lfernandez.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
<img class="hoverimage" src="https://www.codesyntax.com/lfernandezhover.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
I need use this code for my purpose. what can i do to fix this problem?
Thanks for all.
Please refer below link, this should work,
http://www.inmotionhosting.com/support/edu/wordpress/wordpress-introduction/adding-html-wordpress
Log into your WordPress dashboard and create a new page. On that new page you can insert your CV and photo and then publish it.
Use the "text" mode in the text editor (instead of "visual mode") when you use the text editor to create a new page. There you can write HTML code.
Or, in "visual mode", just use select the part of the text on which you want to put the link and clock on the link symbol (the chain icon) above the text editor.

HTML <button> image with some sort of href

I need to create a button with this image https://www.thebankofmaine.com/images/android-app-on-google-play.png and I need to reference it to a file on my server.
How can I do that ?
I've tried this and the image appears, but dont know how to go to a webpage after clicking.
<button type="button" onClick="location.href='index.html'">GO TO URL</button>
How can I change it to go to google.com for example and how can I add a img to the button?
<img src=" https://www.thebankofmaine.com/images/android-app-on-google-play.png" />
I dont exactly get what you are trying to do, but it seems to me that you are just simply trying to make an image a link to click on to lead you somewhere else. This can be done with:
<a href="yourlinktogoto">
<img src="yourpicture.gif" alt="Picture Description" style="border:0">
</a>
You have to change the src, href, and alt.
You dont have to add the border thing but i put it in almost all my images.
Hopefully it will help. tnx

How to put in the current website url in Share button?

I coded some basic share buttons in HTML and CSS. I want to place these buttons on 300 different pages on a simple HTML website.
Is there a easy way to ask for the current link of the website instead of typing in the website URL manually?
Example:
Page 1 www.site.com/home.html
<a class='share-facebook' href="http://www.facebook.com/sharer.php?u= www.site.com/home.html" target="_blank">
This will now share the home page through Facebook:
Page 2 www.site.com/info.html
<a class='share-facebook' href="http://www.facebook.com/sharer.php?u=[current website url-tag or code?]" target="_blank">
What do I type in at "current website URL tag or code" to get the desired outcome? (share www.info.html without actually manually typing in the URL)
Is it even possible with only HTML? If not, how should the JS look like?
No, this isn't possible with pure HTML. In fact, this is often done server-side using languages such as PHP:
<a class='share-facebook' href="http://www.facebook.com/sharer.php?u=<?="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"?>" target="_blank">
In JavaScript, you'll probably have to assign an id to your link first.
HTML:
<a class='share-facebook' href="http://www.facebook.com/sharer.php?u=[current website url-tag or code?]" target="_blank" id="facebook-button">
JavaScript:
document.getElementById("facebook-button").href="document.URL";

Anchor link not working when clicked

Sooo.. I've got this navigation on the frontpage. I'm trying make it link to an anchor on another page.
www.oddfuse.com
This is the anchor link:
<a class="hover" title="Skills" href="/page#skills">
As you can see, it does not redirect to the specified page.
However it does work when typed directly into the address bar:
www.oddfuse.com/page#skills
This also works:
<a class="hover" title="Skills" href="/page">
But with the hash, I get no response whatsoever.
Any ideas on how I fix this?
Okay, so it turned out that it was the jQuery Mobile somehow messing with the anchor tags.
I needed to put data-ajax="false" in the link, and it now works perfectly. TMYK.
Found the solution here
can you try including the file extension?
i.e.
<a class="hover" title="Skills" href="/page.html#skills" />
I'm wondering if it thinks the # is part of a file name that can't be found.
If you want a link to jump a specific location on a different page, you'll need to replace #anchor with the full URL for the target page, similar to:
<a class="hover" title="Skills" href="http://oddfuse.com/page/#skills">