MaraGuide
  • Avatar Database
  • Anagram Sam Solver
  • Pet Valuation Tool
  • Battle Guide
  • Crossword Solver
  • Profile Completion
  • Guides
    • Boutique Tracker
    • Missions
    • Mystery Item
    • Microwave Recipes
    • Drew Transformations
    • Glowing Eggs
    • Sultan Tax
  • Mara Flash Games
  • Image Tools
    • Spotify Signature
    • Visitor Counters
    • Profile Status Bar
    • Goal Bar
  • MaraHTML
    • HTML Intro
    • Working With Images
    • Working With Text
    • Adding Links
    • Creating Tables
    • Miscellaneous
    • CSS Intro
    • Styling Boxes
    • Working With Colours
    • Styling Images
    • Styling Tables
    • Styling Text
    • Pseudo Classes
  • Mara:Force Backup
  • Enter MaraGuide


Ads added by hosting provider.
  • Home
  • Avatars
  • Tools
  • Spotify Signature

MaraHTML

Coding resources, tutorials and more.

HTML Images



Share this page:

To add an image to the page you need to use an <img> element, this is an empty element (no closing tag). It must at the very least have the src attribute. This tells the browser the url of the image.

<img src="http://images.marapets.com/top/top_gallery.png">

Other attributes

height: This specifies the height in pixels.

width: This specifies the width in pixels.

<img src="http://images.marapets.com/top/top_gallery.png" height="200px" width="200px">

NOTE: Increasingly the size of an image is being specified using CSS rather than HTML, this is very useful if you want to change the size of a range of images. It's recommended to specify the size of the image even if you're going to use the default size, otherwise the page will flicker while it loads.

alt:This gives at text description of the image if it can't be seen.

<img src="http://images.marapets.com/_/top_gallery.png" alt="*This image url is broken*!">

*This image url is broken!*

title:This gives a text description as a tooltip.

<img src="http://images.marapets.com/top/top_gallery.png" title="Gallery image icon">

Ads added by hosting provider.

MaraGlobe | Rules | Crafted with by Civ
MaraGuide ©