Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Image Details | Basic Elements
Introduction to HTML

book
Image Details

We have already practiced with images. It is written as <img> and is an empty tag, meaning it does not have a closing tag like regular HTML elements.

  • src attribute is used to specify the source or location of the image.

html

index.html

copy
<img src="https://codefinity-content-media.s3.eu-west-1.amazonaws.com/project+courses+folder/logo.png">
  • alt attribute specify alternative text for the image in case the image cannot be displayed.

html

index.html

copy
<img src="notdisplayedpicture.jpg" alt="Logo">
  • width and height attributes are also crucial for the tag, as they specify the image's dimensions in pixels.

html

index.html

copy
<img src="https://codefinity-content-media.s3.eu-west-1.amazonaws.com/project+courses+folder/logo.png" width=400 height=300>
  • title is used to specify additional information about the image.

html

index.html

copy
<img src="https://codefinity-content-media.s3.eu-west-1.amazonaws.com/project+courses+folder/logo.png" title="Codefinity Logo">

Task

  1. Set the lang attribute to "en".

  2. Create a <title> tag with the content Challenge.

  3. Create a top-level heading with the content Welcome to my webpage.

  4. Add an src attribute with a path to an image you want to add. Also, add an alt attribute.

  5. Add the b and em tags to the paragraph.

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 4

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

We use cookies to make your experience better!
some-alt