Posts Tagged ‘tags’

HTML Tags A and Img

0 Comments

HTML stands for Hyper Text Markup Language. It is basically a language for computers which can tell what you want your website to look like. Using HTML you can decide to move that border a couple of centimeters to the right, or change the colour of that text, or even add images and links. In this post I’ll just be focusing on the image tag (kind of “grammar” needed to put an image on your website) and the anchor tag.

  • The anchor tag is called ‘anchor’, because it is used to attach a link to an image or text, i.e. you ‘anchor’ on a link. It is basically for when you click on an image or line of text, a link (which was attached) will open. There are specific details you can change. For example, you can decide if the link will open into a new tab or window, or even on the same page. You can also choose to open it in a new tab/window, depending on what the person clicking has put in his/her settings. In order to say what the link is ‘anchored’ onto, the tag has an open and finish. Here is an example:
 <A HREF="http://fany.savina.net" target="_blank"> This is a link to my website. </A>
HREF indicates what the link is.
Target is whether it will open in a new window, or stay on the same page.
"_blank" means it will open in a new window but will depend on the users settings. Then comes the actual text that will be linked. And then the tag finishes to indicate that only the text within it has a link.
  • Next is the image tag. This is pretty simple. It is for adding an image to a document or page. You can decide the size of the image (width, length), if you want a link, what the image is, where it is placed, etc.  Here is an example:
<img src="http://fany.savina.net/favicon.ico" width="100">
src is an abbreviation of 'source'. This is to give the location of your image in your server. If the computer doesn't know where to look for the image, then he won't find it and won't be able to display it.
width="100" is (duh) to define the width of the image. You can also define the length, but you must know what lengths and widths go together for your picture (If your picture is originally a rectangle but you give proportions of a square, such as 100x100, your image will be deformed). The proportions are always in pixels. You can add something to say it is in centimeters or inches, but if nothing is put, the computer assumes it is in pixels. By the way, the image I gave was the file for my little house (the one next to the title of this website up above).

So now you know about these two tags. If you want to use them but with different options, there are plenty of sites which offer all the settings you could possible have and what they do, how to use them etc. Just search something like ‘how to use an anchor tag?’ or ‘how to customise an img tag?’. Thanks for reading and I hope you found this useful! Have fun adding those links and images!

Tags: , , , ,