{"id":1448,"date":"2012-02-20T14:30:57","date_gmt":"2012-02-20T21:30:57","guid":{"rendered":"http:\/\/wip2.websitespot.com\/?p=213"},"modified":"2012-02-20T14:30:57","modified_gmt":"2012-02-20T21:30:57","slug":"inserting-images-into-a-website","status":"publish","type":"post","link":"https:\/\/www.websitespot.com\/blog\/inserting-images-into-a-website\/","title":{"rendered":"Inserting Images Into A Website"},"content":{"rendered":"<p>Inserting images into a website is an important part of making a website. This allows you to create a certain feel with your website such as professionalism, commercial or even comedic.<\/p>\n<p>There are quite a few different attributes when it comes to inserting an image into a website such as the layout, how well it's optimized for search engines. Along with attributes that allow you to speed up the time that your site takes to load. This tutorial covers the basics of inserting images and not the manipulation of those images. I've covered the main attributes below.<\/p>\n<h2>Inserting Images<\/h2>\n<p>Inserting an image is an important part of making a website. The tag is as follow:<\/p>\n<p>&lt;img src=\"images\/smiley-face.jpg\"&gt;<\/p>\n<p>This is saying that they file smile-face.jpg is located in the images folder on your website. YOu can place the images anywhere you want on your hosting account but the 'images' folder is pretty much the standard.<\/p>\n<p>The link would appear as: <img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.websitespot.com\/blog\/images\/smiley-face.jpg\" alt=\"smiley face\" width=\"25\" height=\"25\" \/><\/p>\n<h2>The 'Alt' Tag<\/h2>\n<p>The alt tag is used to help search engines determine what your image is related to. This is a must when you're doing your search engine optimization which I cover in the <a title=\"Search Engine Optimization\" href=\"https:\/\/www.websitespot.com\/blog\/search-engine-optimization-tips\/\">search engine optimization<\/a> section.<\/p>\n<p>The tag is as follow:<\/p>\n<p>&lt;img src=\"images\/smiley-face.jpg\" <strong>alt=\"smiley face\"<\/strong>&gt;<\/p>\n<p>This is telling the search engines that this image is related to smiley faces.<\/p>\n<h2>Adding An Image Border<\/h2>\n<p>If you'd like to add a border around your image you can accomplish this with a basic attribute in your HTML code.<\/p>\n<p>The tag is as follow:<\/p>\n<p>&lt;img src=\"images\/smiley-face.jpg\" <strong>border=\"1\"<\/strong>&gt;<\/p>\n<p>The larger the number the larger the border. If you don't want a border just don't add the border attribute at all.<\/p>\n<p>The link would appear as: <img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" style=\"border: 1px solid black;\" src=\"https:\/\/www.websitespot.com\/blog\/images\/smiley-face.jpg\" alt=\"smiley face\" width=\"25\" height=\"25\" border=\"1\" \/><\/p>\n<h2>Specifying Height And Width Of An Image<\/h2>\n<p>If you'd like to specify the size of an image you can do this with a specific attribute as well. The theory is that if you specify the size of the image that your page will load quicker. It certainly doesn't hurt but I generally don't do it for my own site.<\/p>\n<p>The tag is as follow:<\/p>\n<p>&lt;img src=\"images\/smiley-face.jpg\" height=\"25\" width=\"25\"&gt;<\/p>\n<p>The larger the number the larger the border. If you don't want a border just don't add the border attribute at all.<\/p>\n<p>The link would appear as: <img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.websitespot.com\/blog\/images\/smiley-face.jpg\" alt=\"smiley face\" width=\"25\" height=\"25\" \/><\/p>\n<h2>Multiple Attributes in One Image Tag<\/h2>\n<p>If you'd like to add multiple attributes to an image you can simply separate them with a space.<\/p>\n<p>The tag is as follow:<\/p>\n<p>&lt;img src=\"images\/smiley-face.jpg\" border=\"1\" height=\"30\" width=\"30\" alt=\"smiley face\"&gt;<\/p>\n<p>The link would appear as: <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.websitespot.com\/blog\/images\/smiley-face.jpg\" alt=\"smiley face\" width=\"30\" height=\"30\" border=\"1\" \/><\/p>\n<p>As you can see it distorted the image a bit because the actual image size is 25 x 25 but for demonstration purposes I changed it to 30 x 30.<\/p>\n<h2>Images As Hyperlinks To Other Pages Or Websites<\/h2>\n<p>The last thing that I'm going to cover is images as hyperlinks. This will allow you to insert an image into your webpage and enable it to be a clickable link to another page on your website or another website altogether.<\/p>\n<p>The tag is as follow:<\/p>\n<p>&lt;a href=\"http:\/\/www.smileyface.com\"&gt;&lt;img src=\"images\/smiley-face.jpg\"&gt;&lt;\/a&gt;<\/p>\n<p>The link would appear as:  <a href=\"http:\/\/www.smileyface.com\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.websitespot.com\/blog\/images\/smiley-face.jpg\" alt=\"smiley face\" width=\"25\" height=\"25\" border=\"0\" \/><\/a><\/p>\n<p>That's about it for the basic image tags and attributes. Be sure to visit our forum at <a title=\"Webmaster Forum\" href=\"http:\/\/www.justwebtalk.com\">webmaster forum<\/a> for help with any other sort of questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inserting images into a website is an important part of making a website. This allows you to create a certain feel with your website such as professionalism, commercial or even comedic. There are quite a few different attributes when it comes to inserting an image into a website such as the layout, how well it's [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[472],"tags":[],"class_list":["post-1448","post","type-post","status-publish","format-standard","hentry","category-html-tips"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/posts\/1448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/comments?post=1448"}],"version-history":[{"count":0,"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/posts\/1448\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/media?parent=1448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/categories?post=1448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.websitespot.com\/blog\/wp-json\/wp\/v2\/tags?post=1448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}