Multiple choice technology web technology

What are the genral syntax for inline image?

  1. src=img

  2. src=image

  3. img=file

  4. img src=file

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To insert an inline image in HTML, the general syntax is:

<img src="image_file_path" alt="alternate_text">

Where:

  • img is the HTML tag used to define an image
  • src is an attribute used to specify the path to the image file
  • image_file_path is the relative or absolute URL to the image file
  • alt is an attribute used to specify alternate text for the image, which is displayed if the image cannot be loaded or if the user is using a screen reader

Therefore, the correct answer is:

The Answer is: D. img src=file

AI explanation

An inline image in HTML is embedded using the <img> tag with a src attribute pointing at the image file, e.g. <img src="file">. The other options either aren't valid HTML syntax or reverse the attribute/tag relationship.