HTML Basics III 1. Introduction


#1

<!DOCTYPE html>
<html>
	<head>
		<title>Table Time</title>
	</head>
	<body>
		<h1 style="font-family:Arial">Tables Are Mega Sweet</h1>
		<img src="https://s-media-cache-ak0.pinimg.com/564x/c1/a5/56/c1a5560dd3a565075fac3bbfc5a4e47f.jpg"/>
		<a href="https://www.codecademy.com"/>clickhere</a>
	
	</body>
</html

Oops, try again. Make sure to put in at least two images: one regular, the other a link.


#2

@cochi.07,
Read the documentation....
== the Book ==
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a


#3

Hello, im not sure if you still need help. Are you making 2 images one with a link the other just an image?

Remember, just an image is
[img src=""/]

Remember, a link is
Text or image! ( if you texted something, you'll be able to click it )

So, to add a link with a picture, you have to put the [img src] inside the [a href] - (Inside the Text or image!)

Which would look like

[img src=""]

Your adding the image, and turning it into a link.

img src = picture
a href = link

i hope this helps.


#4

Please substuitue [ ] for <>
It would not allow me to put the <> around img src because i'm considered a new user


#5

Your syntax is a bit off after link..."> not / before > where you got clickhere put another image in :slight_smile:


#6

See if this works for you! I've written the explanation in the code as comments!

<!DOCTYPE html>
<html>
	<head>
		<title>Table Time</title>
	</head>
	<body>

<!-- Make sure you nest your image in between your <a href=""></a> tags          ----->

		<h1 style="font-family:Arial">Tables Are Mega Sweet</h1>
		<img src="https://s-media-cache-ak0.pinimg.com/564x/c1/a5/56/c1a5560dd3a565075fac3bbfc5a4e47f.jpg"/>
	        <a href="https://www.codecademy.com"/>clickhere</a>

<!--  The code you have above should be written like this below:             --->

                <h1 style="font-family:Arial">Tables Are Mega Sweet</h1>
		<a href="https://www.codecademy.com"/><img src="https://s-media-cache-ak0.pinimg.com/564x/c1/a5/56/c1a5560dd3a565075fac3bbfc5a4e47f.jpg"/></a>
        
<!-- You now have one image as a LINK, now all you need to do is add another image --->

                      <img src="link to another image here"/>
	</body>
</html

#7

@codejumper07769
Under certain circumstances
you will be required to use the so-called XML-syntax for self-closing HTML-tags
like the img-Tag,
by using an extra-space-character before the 'closer'
like
<img src="link to another image here" />
instead of
<img src="link to another image here"/>


#9

You are a new user, but that's not the reason. When you put < and > in posts, it assumes them to be tags that you are trying to style the post with, and not the code example you're giving. If you'd like these to show up, however, the easiest way to do this is with triple backticks:

```
<img src="visiblecode.png" />
```

and this will show up like this:

<img src="visiblecode.png" />

Hope that helps :slight_smile:


#10

Thanks for that! I have been wondering why sometimes it would accept both and .

I will make sure I adopt the habit of writing it like you just posted as for that reason!


#11