HTML – Images and hyperlinks

img

This element represents an image

common properties:

  • src – Path to the image, it can be on your server or on the web
  • alt – alternate text which is a short description for the image. It is recommended because it provides information to the search engines.
  • title – It is a tooltip, it appear when you hover the image with the mouse
  • width & height – horizontal and vertical dimension. You need to adjust one of the two properties because the web browsers maintain the aspect ratio for the image.

Note that not all browsers support the same image formats. But jpeg, png, svg, gif, and png are supported from all. Also if you use images for decoration(borders, background) is best to be added using CSS.

html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ

Hyperlinks

Hyperlink is any text, image or button that when you click it, it takes you to another page, scroll the page, open your email application. It is recommended to use text instead of images, but in case of using images then use the alt property that describes the purpose of the link. The anchor <a> element is the hyperlink for HTML.

common properties:

  • href – Address of the hyperlink
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
Link to another web page
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
to element on the same page using the id attribute
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
open your email application and send email to blabla@gmail.com
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
the same example as before but with a subject
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
  • target – where the link opens.
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ
  • download – Whether to download the resource instead of navigating to it, and its file name if so
html img and achor elements, <span>HTML – Images and hyperlinks</span>, KandZ

THE END!!!

90870cookie-checkHTML – Images and hyperlinksHTML – Images and hyperlinks

Related posts

One Thought to “HTML – Images and hyperlinks

Comments are closed.