Basic HTML Structure of Text or Image Link or Flash SWF Advertisement

From Codex
Revision as of 20:17, 7 July 2011 by Gabfire (Talk | contribs)
Jump to: navigation, search

Thought this would be helpful to some folks. The basic html structure for inserting a text link or an image that links to a specific URL is the following:

NOTE: You need to update the URLs and Paths to match your domain.


Contents

TEXT LINK

Text Link Opens in Same Window/Tab:

<a href="http://www.DestinationURL.com/">Link Text</a> 

Text Link Opens in New Window/Tab:

<a href="http://www.DestinationURL.com/"  target="_blank">Link Text</a> 

IMAGE LINK

You can insert HTML to link an Image to a specific URL as well using the code below. This assumes you have uploaded your image to your server and identified its path.

Image Link Opens in Same Window/Tab:

<a href="http://www.TheDestinationURL.com"><img src="http://www.URLPathofIMage.com/Path/To/URL/Image.jpg" alt="AlternativeTextToShow" /></a> 

Image Link Opens in New Window/Tab:

<a href="http://www.TheDestinationURL.com" target="_blank"><img src="http://www.URLPathofIMage.com/Path/To/URL/Image.jpg" alt="AlternativeTextToShow" /></a> 

What if I just want to add an image somewhere but do NOT want it to link anywhere? Simple! Just get rid of the <a href tags as shown below. This assumes you have uploaded your image to your server and identified its path.

<img src="http://www.URLPathofIMage.com/Path/To/URL/Image.jpg" alt="AlternativeTextToShow" /> 

WORKING EXAMPLE OF IMAGE AD:

  1. Go to Theme Settings / Theme Options
  2. COPY and PASTE code below into an ad area (preferably: 468x60)
<a href="http://www.gabfirethemes.com"><img src="http://www.gabfirethemes.com/wp-content/uploads/2008/07/468x60-2.jpg" alt="Sample Ad Code"/></a> 
  1. Click SAVE.
  2. Now refresh your site, and you will see the Gabfire Themes image ad.

All you have to do is replace our image URL with your own as instructed.

FLASH (SWF) ADVERTISEMENT:

A flash advertisement would need to be in the .swf (shockwave) format. To use it, just replace the data & value URL paths and width/height accordingly in the code example below:

<object type="application/x-shockwave-flash data="http://www.URLPath.com/Path/To/file.swf" width="300" height="250">
<param name="movie" value="http://www.URLPath.com/Path/To/file.swf" /></object> 
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox