Phone Now 01323 649779

Contact us now!

Phone 01323 649779, email us or fill out our online enquiry form.


Newsletter

Privacy | Unsubscribe

Images with SML

Images in SML are displayed using the <img> tag, in the same way as HTML. For example, the following code displays the Switchplane logo.

<img src="http://www.switchplane.com/images/project/logo.gif" alt="Switchplane Logo" />


Switchplane Logo

The src Attribute

The src attribute is the URL where the image is stored. URLs may be fully qualified (as in the example) or relative e.g. src="images/logo.gif".

The alt Attribute

The alt attribute gives alternate text for the image. This is useful because:

  • It helps people with eyesight problems because they can use a screen reader to read the alt text aloud
  • It tells the search engines more information about the image, which improves indexing and search engine ranking
  • It allows people browsing in text-only mode to see a brief description of the image

Alternate text is compulsory in the HTML standard so if you leave it out, our system automatically generates an empty alt attribute. This is valid HTML and is appropriate in some circumstances, however we recommend you always use a short alternative description.