Tools, FAQ, Tutorials:
Attributes of an HTML 'img' Element
What Are the Attributes of an "img" Element?
✍: FYIcenter.com
There are 4 commonly used attributes for an "img" element:
Here is a tutorial example of an "img" element with all 4 attributes:
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Image Attributes</title>
</head>
<body>
<h4>Inline Images</h4>
<p style="background-color: #eeeeee; padding: 8px;">
What is the size of this image?
<img src="/moonrise.jpg" alt="Moonrise"
width="69" height="91"/>
width="69" and height="91".</p>
</body>
</html>
If you save the above document as image_attributes.html, download this image file and view it with Internet Explorer, you will see an image embedded inline with width and height attributes in a text paragraph as shown below:
⇒ Reducing the Display Size of an Image in HTML
2017-03-27, ∼2699🔥, 0💬
Popular Posts:
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
How to install "C++/CLI Support" component in Visual Studio? I need to build my Visual Studio C++/CL...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...