Help - Search - Members - Calendar
Full Version: Cannot complete <img src and <a href>
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
htmlisneeded
Seeking assistance. The first item, I cannot seem to add a photo. When copying News.jpg from the picture properties in my computer than adding it to the HTML img src, the picture does not appear. The second issue is how can I add <a href="mailto:JohnDoe@Help.com">your anchor text</a> to the html <p><button class="button">Contact</button></p>?

Can any provide suggestions or help? The htlm I am attempting to complete is below.
</style>
</head>
<body>

<h2>Meet The Team</h2>
<p>We are led by a team of dedicated executives and colleagues around the world.
.</p>
<p><button class="button">Contact a Committee Lead.</button></p>
</div>
</div>
</div>
<div class="column">
<div class="card">
<img src=" News.JPG" alt="John Doe" style="width:100%">
<div class="container">
<h2>John Doe</h2>
<p class="title">Art Director</p>
<p>Some text that describes me lorem ipsum ipsum lorem.</p>
<p>JohnDoe@help.com</p>
<p><button class="button">Contact</button></p>
</div>
</div>

Christian J
QUOTE(htmlisneeded @ Nov 12 2018, 10:54 PM) *

When copying News.jpg from the picture properties in my computer than adding it to the HTML img src, the picture does not appear.

The spelling must be identical, including case (.jpg vs .JPG).

QUOTE
The second issue is how can I add <a href="mailto:JohnDoe@Help.com">your anchor text</a> to the html <p><button class="button">Contact</button></p>?

See http://htmlhelp.com/faq/html/links.html#button-link (but note that mailto links only work if the user's computer has an email client installed, and not with online webmail services).


pandy
I'm pretty sure the file name doesn't start with a space.

CODE
<img src=" News.JPG" alt="John Doe" style="width:100%">
         ^^^


The path must also be correct. Is the image in the same folder as the HTML?
htmlisneeded
Thank you guys. I was able to add the HTML image. However I am still having trouble with linking an email address to the button html I have.

Hi Christan J, how can I add the below to the html to yesterdays post? I truely appreciate the help. Thank you.
6.7. How do I create a button which acts like a link?
This is best done with a small form:

<FORM ACTION="[URL]" METHOD=GET>
<INPUT TYPE=submit VALUE="Text on button">
</FORM>
pandy
You can't. A can't be used with BUTTON.

You need to use a form. Like so.

CODE
<form action="mailto:JohnDoe@Help.com">
<button type="submit" class="button">your anchor text</button>
</form>


But you could just as well use an ordinary submit button. Or you could use JavaScript with BUTTON. But mailto is unreliable as it is, so no need to make it even more so by using JS.
pandy
Hey, I remembered wrong. You can't put a link inside BUTTON, but it seems you can put a button inside a link. I could have sworn neither was allowed.

So you CAN do it like this.

HTML
<a href="mailto:JohnDoe@Help.com"><button type="submit" class="button">your anchor text</button></a>


Sorry for misleading you. blush.gif

htmlisneeded
Thank you Pandy! It works!! Thank you for the follow up truely appreciate it!


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.