HTML: Inserting a graphic

This entry is part 29 of 34 in the series HTML

Inserting a graphic on a webpage is as simple as placing an <img> tag where you want the graphic to appear:

<img src='ushuaia.jpg'>

Here you are assuming ushuaia.jpg is in the same directory as the html file.

You can use an absolute path as in:

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Image</title>
</head>
<body>

<img src='//codecrawl.com/code/images/ushuaia.jpg'>

</body>
</html>

Series Navigation<< HTML: Understanding graphic size and resolution
HTML: Positioning the image >>