Image and anchor in HTML

11 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€46.84
List Price:  €65.59
You save:  €18.74
£40.02
List Price:  £56.03
You save:  £16.01
CA$68.85
List Price:  CA$96.39
You save:  CA$27.54
A$77.12
List Price:  A$107.98
You save:  A$30.85
S$68.21
List Price:  S$95.50
You save:  S$27.29
HK$391.10
List Price:  HK$547.57
You save:  HK$156.47
CHF 46.02
List Price:  CHF 64.43
You save:  CHF 18.41
NOK kr554.84
List Price:  NOK kr776.82
You save:  NOK kr221.98
DKK kr349.42
List Price:  DKK kr489.21
You save:  DKK kr139.79
NZ$84.86
List Price:  NZ$118.81
You save:  NZ$33.95
د.إ183.60
List Price:  د.إ257.06
You save:  د.إ73.45
৳5,520.52
List Price:  ৳7,729.18
You save:  ৳2,208.65
₹4,173.28
List Price:  ₹5,842.93
You save:  ₹1,669.64
RM238.32
List Price:  RM333.67
You save:  RM95.35
₦66,243.24
List Price:  ₦92,745.84
You save:  ₦26,502.60
₨13,999.18
List Price:  ₨19,599.98
You save:  ₨5,600.79
฿1,857.12
List Price:  ฿2,600.12
You save:  ฿743
₺1,622.27
List Price:  ₺2,271.31
You save:  ₺649.04
B$259.73
List Price:  B$363.64
You save:  B$103.91
R934.43
List Price:  R1,308.28
You save:  R373.84
Лв91.63
List Price:  Лв128.30
You save:  Лв36.66
₩69,279.33
List Price:  ₩96,996.60
You save:  ₩27,717.27
₪186.71
List Price:  ₪261.41
You save:  ₪74.69
₱2,889.54
List Price:  ₱4,045.59
You save:  ₱1,156.04
¥7,894.37
List Price:  ¥11,052.75
You save:  ¥3,158.38
MX$855.53
List Price:  MX$1,197.81
You save:  MX$342.28
QR183.78
List Price:  QR257.31
You save:  QR73.52
P714.32
List Price:  P1,000.11
You save:  P285.78
KSh6,668.17
List Price:  KSh9,335.98
You save:  KSh2,667.80
E£2,392.69
List Price:  E£3,349.95
You save:  E£957.26
ብር2,866.71
List Price:  ብር4,013.63
You save:  ብር1,146.91
Kz41,718.65
List Price:  Kz58,409.45
You save:  Kz16,690.80
CLP$48,067.30
List Price:  CLP$67,298.07
You save:  CLP$19,230.76
CN¥361.97
List Price:  CN¥506.79
You save:  CN¥144.82
RD$2,943.98
List Price:  RD$4,121.81
You save:  RD$1,177.82
DA6,730.95
List Price:  DA9,423.87
You save:  DA2,692.92
FJ$114.25
List Price:  FJ$159.96
You save:  FJ$45.71
Q390.96
List Price:  Q547.38
You save:  Q156.41
GY$10,529.51
List Price:  GY$14,742.16
You save:  GY$4,212.64
ISK kr7,023.09
List Price:  ISK kr9,832.89
You save:  ISK kr2,809.80
DH508.71
List Price:  DH712.24
You save:  DH203.52
L887.81
List Price:  L1,243.01
You save:  L355.19
ден2,890.32
List Price:  ден4,046.68
You save:  ден1,156.36
MOP$402.89
List Price:  MOP$564.08
You save:  MOP$161.19
N$939.91
List Price:  N$1,315.96
You save:  N$376.04
C$1,851.58
List Price:  C$2,592.36
You save:  C$740.78
रु6,678.15
List Price:  रु9,349.94
You save:  रु2,671.79
S/188.35
List Price:  S/263.70
You save:  S/75.35
K194.24
List Price:  K271.96
You save:  K77.71
SAR187.48
List Price:  SAR262.49
You save:  SAR75
ZK1,347.15
List Price:  ZK1,886.12
You save:  ZK538.96
L233.12
List Price:  L326.39
You save:  L93.26
Kč1,178.64
List Price:  Kč1,650.20
You save:  Kč471.55
Ft18,305.53
List Price:  Ft25,629.21
You save:  Ft7,323.68
SEK kr550.47
List Price:  SEK kr770.71
You save:  SEK kr220.23
ARS$44,067.56
List Price:  ARS$61,698.11
You save:  ARS$17,630.55
Bs347.73
List Price:  Bs486.86
You save:  Bs139.12
COP$193,896.94
List Price:  COP$271,471.23
You save:  COP$77,574.29
₡25,583.92
List Price:  ₡35,819.54
You save:  ₡10,235.61
L1,243.01
List Price:  L1,740.31
You save:  L497.30
₲375,896.46
List Price:  ₲526,285.13
You save:  ₲150,388.66
$U1,928.40
List Price:  $U2,699.91
You save:  $U771.51
zł203.42
List Price:  zł284.80
You save:  zł81.38
Already have an account? Log In

Transcript

Hello, guys, I am Shahzad Ahmed and welcome election number six. Today we are going to discuss about the anchor and the images. So how can you show your images? First of all, we are starting from the images. So you have to we are working on the index dot HTML file, because this is the file, we are working on it. So this is the title.

And these are the elements or sorry, these are the tags. And I can say this HTML is the element header element. Okay, we are defining our elements or anything in the body sections. First of all, how can you show your image and as you can see, I have this image. So how can you show the image on the web browser or sorry, on the web page. So, why I'm saying web page because, and that's what HTML is a file and I can say this is the webpage because this file You can execute this file on the browser.

Okay? So that's why I'm saying the webpage Okay. So now write your tag, tag, listen sign IMG IMG is a tag name. And now close your IMG. Okay, because you are starting your HTML, and now you are closing your HTML. But you don't need to close the image tags before the call, you can start your few tags, like IMG tags, and we will discuss about other tags.

So you don't need to close these tags. So just use the image tag First of all, and the property which is the SRC, that means we are saying that fetch where where is that image? Where is the actual image? I'm saying that this is the file and I have to To copy one image, so this is the image, I am pasting this image here. And now the image name is for suppose first and make sure you have to check that type of the image. So this is the J, JPEG jpg image.

So mostly you have a jpg, jpg, png, and other formats images. So this is a jpg image format, because the file and the image available in the same directory. So that's why I'm saying that just first dot jpg, okay, go to URL. Now, this is the file index dot HTML file. So as you can see, this is the index dot HTML file, go to your folder, click on the index dot HTML file, because this is that large file, so that's why it's showing us Okay. Okay, so this is a file.

This is the image possible, if you will, if you have a folder like images. And you can cut your file and you can paste your file here. So now your images, your image is not here. So go to your page, refresh the file. So now as you can see, it's not showing you image because as you can see failed to load resources where the JPG is not available, because your file is exist on the HTML folder, but your image is available inside the images folder. So how can you define the folder I'm saying that go to the images folder and find the first dot jpg, go to your page, refresh the go to your browser.

And now refresh the page. So now as you can see, it's showing us the image. So in this way you can show your images first of all and in this way if you have if you have any images available inside your enter directories you can define your directories for suppose, if you have another inner directory for suppose enter and your image available inside your image directory, refresh the page. So now we can see it's not showing us image because you are saying that image is available inside the images. And the image name is this bird in the images sections. There's not available the first dot jpg image.

So that's why I'm saying go to the image folder. And inside the image folder, we have another folder name inner. So I'm saying inner. In the inner folder, we have the first raw JPEG file or the image refresh the page. Now as you can see, it's showing us the image okay. So in this way you can create your images.

And now what is the anchor for suppose How can you join your two pages to webpages This is our official website. First of all, I have my this is the file as you can see it's a file, and it's showing us some information and payment options. This is another file. So how I have to define our or I have to link these file, right click inspect element. So as you can see, I'm using the anchor and I'm using the link of the file where is the file available? So don't worry about it.

I am going to explain each and everything. So in the HTML file, we have our index dot HTML file, we have our second dot html file. For suppose I am saying Sorry, get focused Second. Okay. Suppose I'm saying, one, I'm defining h1, and I'm saying this is my homepage. And I am defining anchor anchor href h ref.

Make sure double quotation equals two. And now I have to close my anchor. Right your patriot first of all I'm saying second, go to your page, refresh the page. Now as you can see, I have to break this. Via that means break the row. As you can see, it's showing me that second so this is your homepage.

And now I have to open this second page Now I am writing open the second page, just drag your second value prop here. So this is your second page, I am saying this is my second page, and I am defining the anchor href href correlation quotation, and I'm closing the anchor here. And now I'm staying home, go to your browser, refresh the page. So now if this is your home, this is your second page, and this is your first page, okay? It's saying second, go to the second page, and I'm saying go to the homepage. If I click this, it's not going to anywhere.

Why? Because I have to define where is the file in the index dot HTML file. I'm saying that we have a file name, second dot html Okay, now go to you. Okay, go to your page, refresh the page, and click on this file, click on this. So now as you can see, it's currently showing the second dot html page. Okay, it's working fine because you you have connected to files.

And now I'm seeing on the second dot html file, I'm saying we have that index dot HTML file. Go to your page, refresh the page. And now click on the home file. As you can see, now we are at the index dot HTML file. Click on the second we are at the second HTML file. So you can create your anchor or you can select anything like this.

First of all, you are two files available on the same directory sorry in the same directory. As you can see, you have your index HTML directory and you have your two files for suppose if Your second file is available inside the images folder. And now, go to your page refresh the page. Now click on the second link, it's saying that your file was not found or you will find an error 404 that means page not found, because you are saying because you are saying that this file index dot HTML file is available on the HTML folder. But you are saying on the same folder, you have your HTML dot second dot html file, but as you can see, you don't you do not have any second dot html file here you have the second HTML file in that images directory. So you have to define that go to the first of all, go to the images directory, then find the second dot html file.

Okay, so now Go to the page refresh, go to the page. Now click on that second so as you can see it's working fine. So in this way you can define your pages and go to your and and how can just go to you just click on the first of all go click on this second link now click on the homepage it's not finding the page because your second dot html folder available on the in the images directory but your index dot HTML file, just click on this and drag and drop here you are saying that in the images folder, you have your index dot HTML file. So as you can see here, you do not have any index dot HTML file your index dot HTML file available in the previous directory in which directory index dot HTML. So now I have to say that double dot That means I am saying that go to the previous directory and find the index dot HTML file.

Now this is that second. Now click on this link. It's saying it's showing you the home page click on the second is showing you the second page, click on the sharing the homepage. So in this way you can create your anchor and you can create your images. So I think this is enough for today. In the next lecture, we are going to cover some other topics related with HTML.

So thanks for watching.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.