WebsiteSpot Logo
  • DOMAINS
  • SEO
  • SOCIAL MEDIA
  • MARKETING
  • SOCIAL MEDIA
  • E-COMMERCE
  • HTML TIPS
  • WORDPRESS
  • MARKETING
  • 
  • 
  • 
  • 
  • 

Inserting Images Into A Website

  • David
  • February 20th, 2012
  • Home
  • »
  • HTML TIPS
  • »
  • Inserting Images Into A Website

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 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.

Inserting Images

Inserting an image is an important part of making a website. The tag is as follow:

<img src="images/smiley-face.jpg">

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.

The link would appear as: smiley face

The 'Alt' Tag

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 search engine optimization section.

The tag is as follow:

<img src="images/smiley-face.jpg" alt="smiley face">

This is telling the search engines that this image is related to smiley faces.

Adding An Image Border

If you'd like to add a border around your image you can accomplish this with a basic attribute in your HTML code.

The tag is as follow:

<img src="images/smiley-face.jpg" border="1">

The larger the number the larger the border. If you don't want a border just don't add the border attribute at all.

The link would appear as: smiley face

Specifying Height And Width Of An Image

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.

The tag is as follow:

<img src="images/smiley-face.jpg" height="25" width="25">

The larger the number the larger the border. If you don't want a border just don't add the border attribute at all.

The link would appear as: smiley face

Multiple Attributes in One Image Tag

If you'd like to add multiple attributes to an image you can simply separate them with a space.

The tag is as follow:

<img src="images/smiley-face.jpg" border="1" height="30" width="30" alt="smiley face">

The link would appear as: smiley face

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.

Images As Hyperlinks To Other Pages Or Websites

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.

The tag is as follow:

<a href="http://www.smileyface.com"><img src="images/smiley-face.jpg"></a>

The link would appear as: smiley face

That's about it for the basic image tags and attributes. Be sure to visit our forum at webmaster forum for help with any other sort of questions.

About The Author

David Follow @davidlalumendre

Author profile and article archive for David Lalumendre at Website Spot

Recent Articles

  • Free Website Templates
  • domain name extensionsIs The Com Extension Best For Search Engine Rankings?
  • SSL CertificateWhat Is a SSL Certificate?
  • Moving from HTTP to HTTPSSEO Considerations When Moving from HTTP to HTTPS

Comments are closed.

Recent Posts

  • CartStack Review : My Personal Experience With Cart Stack
  • What are Local Citations And How They Benefit Local SEO
  • How to Get Started With Local SEO In 2018
  • What Is A Domain Name? [Infographic]
  • How to Register a Domain Name: A Step-by-Step Guide

Tags

abandoned cart recovery advertising affiliate marketing Bing Black Hat SEO blog blogging blogs blog writing Business content marketing content writing disavow links domain name Domain name registrar Domain Names domain registration tips ecommerce elance Email marketing Facebook Google Google AMP Google Analytics Google Authorship google panda how to make a website html internet marketing Local business Local SEO Make Money Online odesk Online business Pay per click Search Engines SEO Small business Social media Twitter Web Design Web search engine website Wordpress Writing Content
#

Website Spot is a leading provider of domain names and website building solutions.
Our mission is to offer affordable options for building a website and providing easy to
use software to make building a website affordable without the need for professional developers.
Part of this mission is to offer up to date information via our blog with the latest tips and
trends in the website building industry.

  • 
  • 
  • 
  • 
  • 
  • Terms Of Service

Copyright © 2015 WebsiteSpot LLC. All Rights Reserved. Mobile Site