How to place the picture

How to place the picture

Pictures, as well as all other elements of the web page, are displayed by the browser according to detailed instructions which to it are sent by the server. These instructions are written in the HTML language (HyperText Markup Language - "hypertext markup language") and consist of "tags". Tags describe type of all elements of the web page, their arrangement and appearance.

Instruction

1. At first you need to load the image file on the server. It is possible to make it under the FTP-protocol (File Transfer Protocol - "file transfer protocol") through the special program. Call these programs FTP-clients - for example, Cute FTP, WS FTP, FlashFXP and others. But it is possible to load via the file manager which should be in the hosting control panel on which your website is placed. The file manager allows to download files via the browser.

2. After that it is necessary to place the corresponding tag in HTML code of the necessary page. That is, you should find this page and to open its source code for editing. If you have a file of the page, then it is possible to open it the simple text editor - for example, a standard Notepad. And if for management of the website you use any system, then find in the panel of administration of this system the editor of pages and open in it the necessary page. After that it will be necessary to insert the tag of the image into the place necessary to you on the page and to save changes.

3. In more detail about the tag - in the simplest option it can look so: <img src= "" image.gif""> the Tag contains different additional information - "attributes". For the tag of the image only one attribute - src is obligatory. He specifies to the browser the address to which it should take the file containing karninku. If this file lies on the server in the same folder (or enclosed in it), as the page, then is enough to enter only his name or path to the enclosed folder. Such addresses are called "relative". And the absolute address can look so:
<img src= ""http://site.ru/image.gif""> - Other attribute - alt - contains the text which appears in the tooltip balloon when targeting a mouse: <img src= "" image.gif"" alt= "" the text about the picture""> Precisely same most also another does attributes - title: <img src= "" image.gif"" title= "" the text about the picture""> - Two attributes - width and height - set the size of a rectangle in which the browser will display the image: <img src= "" image.gif"" width= "" 100" of" height= "" 200""> These attributes are not obligatory, but if something goes not and the picture will not be able to be loaded, then all other elements of the page can appear not on the places as the browser does not learn the sizes which the picture had to occupy. The sizes are specified in "pixels" - it is the basic measurement unit used at a marking of pages. - The border attribute sets border width around the image (in pixels): <img src= "" image.gif"" border= "" 4""> If to make the picture the link, then by default the browser will draw around it a blue frame. To get rid of it the border value is necessary in zero: <a href= ""http://site.ru""> <img src= "" image.gif"" border= "" 0""> </a> - Two attributes set a picture indent from the next elements (for example from lines of the text) - hspace sets an indent in horizontal direction (at the left and on the right), vspace - in vertical direction (from below and on top): <img src= "" image.gif"" hspace= "" 5" of" vspace= "" 6""> are the most common attributes, and all them for this tag more than 50!

Author: «MirrorInfo» Dream Team


Print