In HTML images are defined with the <img> tag.
Syntax for defining an image tag:
simple example: <img src="url/location">
HTML Images - with Alt Attribute:
The required alt attribute specifies an alternate text for an image, if the image cannot be displayed then show the "alt" text ("alt" text is very important for on page SEO).
The value of the alt attribute is an author-defined text:
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwSn7l-BEulSheIYUMvoNuW8uXazcDDW7ASCLPcr-txeTxQfnxLoXoIVToDGw9FULgAk6Ef1R0-8pAOs5rXb4RnjIXzDKZ2Clpnw30ZoyFHy7BVnGm3l_qSyTOoW-zXGglX8x9xSDpvcM/s1600/webcoach.png" alt="Online Web coach">
Output:
HTML Images - Set Height and Width of an Image tag:
The height and width attributes are used to specify the height and width of an image ( Height and Width is defined in pixle).
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwSn7l-BEulSheIYUMvoNuW8uXazcDDW7ASCLPcr-txeTxQfnxLoXoIVToDGw9FULgAk6Ef1R0-8pAOs5rXb4RnjIXzDKZ2Clpnw30ZoyFHy7BVnGm3l_qSyTOoW-zXGglX8x9xSDpvcM/s1600/webcoach.png" alt="Online Web coach" width="180" height="42">
HTML Images - Set with Link:
You can connected your image Hyperlink or Link, for example:
<a href="http://onlinewebcoach.blogspot.com/"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwSn7l-BEulSheIYUMvoNuW8uXazcDDW7ASCLPcr-txeTxQfnxLoXoIVToDGw9FULgAk6Ef1R0-8pAOs5rXb4RnjIXzDKZ2Clpnw30ZoyFHy7BVnGm3l_qSyTOoW-zXGglX8x9xSDpvcM/s1600/webcoach.png" alt="Online Web coach" width="180" height="42"></a>
No comments:
Post a Comment