HTML Dog
Skip to navigation

HTML images

The img element.

HTML

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Images: img</title>
	<style>
		body {
			font-size: 20px;
		}
		article {
			width: 480px;
			margin: auto;
		}
		h1, #htmldog {
			text-align: center;
		}
	</style>
</head>
<body>
	<article>
		<h1>Images</h1>
		<p>HTML images, inserted using <a href="http://www.htmldog.com/references/html/tags/img/">the <code>img</code> tag</a>, are used for meaningful content.</p>
		<img src="/examples/images/ecuador_anaconda.jpg" width="480" height="287" alt="Anaconda">
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
		<img src="/examples/images/ecuador_tarantula.jpg" width="480" height="360" alt="Tarantula">
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
		<img src="/examples/images/ecuador_owlMonkeys.jpg" width="480" height="315" alt="Owl monkeys">

		<!-- Link back to HTML Dog: -->
		<p id="htmldog"><a href="http://www.htmldog.com/examples/"><img src="http://www.htmldog.com/badge1.gif" alt="HTML Dog"></a></p>
	</article>
</body>
</html>

Output

View original