For placement of graphic images on web sides. Image. The rest is up to you

Most of the Web-sides have shrunk graphics. Vaughn allows barvisto and in person to present information. In bagatioh vipadkakh, show the picture more clearly, give a text description below.

There are two ways to place graphic images on the side:

  • inserting okremi pictures;
  • filling the background with a picture.

For whatever reason, the graphic image is taken from the file.

Inserting graphics

Inserting a graphic image on the side of a graphic file is carried out after an additional tag (Type English, image - image) from the assigned file address in the SRC attribute argument:

< IMG SRC = "адрес_графического_файла" >

Addresses of the graphic file - this is the URL address, or the name of the file, possibly from the designated route. For example, to display a graphic file logotip.jpg, write a tag:

< IMG SRC = "logotip.jpg" >

To improve the speed of transmission of the graphic image in the abstract you can twist the attribute ( additional parameter) LOWSRC, which is accepted as an argument to the address of a graphic file. You can create two graphic files: one (for example, don't have the file logotip.jpg) to replace the image, I will remove it from a high-level building, and the second one (for example, logotip.gif) - the image, I will remove it from low clearance. Same tag:

< IMG SRC = "logotip.jpg" LOWSRC = "logotip.gif" >

... tell the browser to start downloading the logotip.gif file, and then let the world accept it to replace it with the logotip.jpg file.

Another way to speed up the advancement of graphic fields is in the direct area, in which the graphic image will be placed, for additional attributes WIDTH(width) i HEIGHT(Visota), vimiryuvanih in pixels. If you specify the attributes, then the browser will see the field in the chart, prepare the layout of the document, display the text, and only then add the chart. Respectfully, that the browser is squeezing or stretching the image, insert it into the frame of the designated size. An example of a statement of the re-mapping of the image:

< IMG SRC = "logotip.gif" WIDTH = 40 HEIGHT = 20 >

The graphics sound victorious at the same time as the text, which is due to the task of visualizing the text and the graphic image. Tse zavdannya vyrishuetsya for additional attribute ALIGN tag from the summation of various arguments. For example, we can encourage you to wrap the text around the picture on the right, otherwise it’s evil. Sound the picture into the background with the text, which may be ugly. To avoid this, you can set empty fields like illustrations. Fields are created for additional attributes VSPACE for upper and lower fields HSPACE for garden fields in abstract . Arguments of these attributes are indicated by looking at numbers, which indicate the number of fields in pixels. Use a tag as a text to wrap around graphics
.

The advancing tag sets the graphic wrapping of the logotip.jpg file on the right (the picture will be included in the text):

< IMG SRC = "logotip.jpg" ALIGN = LEFT >

If it is necessary to change the picture right-handed in the text, then it is necessary to attribute ALIGN bring an argument RIGHT:

< IMG SRC = "logotip.jpg" ALIGN = RIGHT >

To set the fields on the side of the picture, you need to write a tag like:

< IMG SRC = "logotip.jpg" ALIGN = LEFT HSPACE = 20 VSPACE = 10 >

Here the numbers 20 and 10 signify the expansion of fields.

Let's take a look at the butt of a spilny vikoristanny of graphics and texts. Open Notepad (Text editor Notepad) Windows. Write in a new HTML-code with different tags looked at. The program should be hovered below to display the actual text and graphics. As a graphic file, you can twist any of the most recent files you have. Here the logotip.gif file is vindicated.

< HTML >

< HEAD >

< TITLE >Right 1< / TITLE >

< / HEAD >

< BODY BGCOLOR = "YELLOW" >

< IMG SRC = "logotip.gif " ALIGN = LEFT >

< H1 >Text over graphics right-handed< / H1 >

Mal. 657. The text wraps around the picture on the right

Wide possibilities for precise positioning of the image (as well as other elements) on the side tablesі styles. qi HTML elements will be looked at later. For example, you can designate a table without visible frames, and in the middle of the table you can place pictures, texts and other elements.

Graphic images, placed on the Web-side, do not only saturate the shortest perception of information, but also allow the bottling of the side to be more clear and such as to be forgotten. Graphic images you can prepare yourself or use the services of designers. You can also tweet libraries of graphic files software products, such as Microsoft office, CorelDraw, etc.

There is a graphic image from the Clip Art library on the home side of the Web site created by us, which is included in the Microsoft Office warehouse. For whom, read the following:

  1. Check out the creations of Web-vouzol.
  2. Vіdkryte home side, Double-clicking the mouse on the file name index.htm in the panel folder list(Folder List).
  3. Menu insert(Insert) select command little ones Pictures(Clip Art). Vіknі FrontPage software z'is a panel insert picture(Insert Clip Art).
  4. Select a command on my panel collection of pictures(Media Gallery). There is a dialogue box that allows you to select a graphic image (Fig. 15.8).

Mal. 15.8.

At the upper part of the dialog box, there are three buttons, which are displayed as shown in the window of objects, as well as copying and removing objects, the recognition buttons are removed (div. Table).

  1. panel collection list sweep your computer's folders with multimedia files, as well as image files from the Clip Art library. Open the folder to select the category of pictures for you. The working area of ​​the window will have an image of this category. When the cursor is placed on the image, you can see a hint with the name of the image, the size of the image and the file, in which wine to move, as well as the format of the graphic image (Fig. 15.9).
  1. Press the button with the arrow z right side reverse image. There is a context menu.
  2. Select a command from the context menu copy(Soru).
  3. Go to the Web-side and paste on it from the clipboard the image, vikoristovuchi for whomevery handy zasib. For example, press a combination of keys +.
  4. Save the Web-side with placement in any graphic images by pressing the button save(Save) on the standard toolbar. It's a dialogue window Saving file management(Save Embedded Files) (Fig. 15.10), which suggests saving placement on the side of the image in the folder images Web site under the name, with which the file was in the library. Tse vikno to avenge the buttons of offensive recognition:
    • rename(Rename) - allows you to rename the file.
    • change folder(Change Folder) - open dialog box folder change(Change Folder) to change the folders of a streaming Web site, allowing you to select a different folder to save the file.
    • Diya(Set Action) opens a dialog box Head of department, which allows you to change the value save(Save) stovpchika Diya (Action) on Never save(Don "t Save). When choosing a value save the little ones are saved from the Web site you designated, in another case, on the Web side, you can get a copy of the image, as if you are going to the Clip Art library.

region little ones(Picture preview) shows the image being displayed. Having installed in the dialogue window Saving file management need parameters, press the button OK. The graphic file will be saved by the Web site you designate.

Mal. 15.10.

Placement of a graphic image in a file

We looked at the placement on the Web-side of a graphic image from the Clip Ait library. To place a graphic image on the side of the file, click one of these images:

  • Menu insert(Insert) select command little ones(Picture) from file(From file)
  • Press button Add little ones from the file(Insert Picture From File) on the standard toolbar
  • Press button Add little ones from the file(Insert Picture From File) on the toolbar little ones(Pictures)

When vikonannі whether s tsikh dіy vіdkrivаєtsya dialogue vіkno little ones(Picture) (Fig. 15.11). Find the required graphic file for help and for its placement on the Web-side press the button insert(Insert). The dialogue window will close, and the image will be placed on the side.

Mal. 15.11.

Improving the power of the image

After the placement of the image on the Web-side, it is necessary to improve the authority, victorious dialogue window little power(Picture Properties) (Fig. 15.12). For yoga, click on the mouse on the image, and then click on one of these actions:

  • Menu format(Format) select command authority(Properties)
  • Choose a team context menu little power(Picture Properties)
  • Press a combination of keys +

Dialogue window little power delete three tabs: hot(General), video recording(Video) view(appearance). Let's take a closer look at the possibility of tuning for the help of this day's guide.

To insert an image into the text of the Web-side, a single tag is added (Table P 1). The attributes of this tag set all the parameters of the image that are placed on the side. Obov'yazkovoy є SRC attribute, which is assigned to the address and name of the graphic file. If the SRC attribute is not set, then only the empty image icon will be displayed.

tag structure With the SRC attribute, you can see:

.

If the graphic file in the name of the Institute is in the same folder as the Web-site, then for this placement you should write down:

.

File Format

For placing a graphic file with the name MINSK, which is known for the address D: \ Collection \ Mista \ MINSK.GIF, write next .

For help tag on the Web-side there is a graphic file that is located on another computer in global network"Internet".

To create a Web-side with a photograph of our institute, as shown in fig. 4.1, you need to enter the following HTML code:

Web site with photo

our institute

Mal. 4.1. Web-side with a photo of the institute

For the hovered butt, the height of the photo (HEIGHT) should be 200 pixels, and the width (WIDTH) - 300 pixels. For the placement of the photograph, a paragraph is created with the alignment in the center.

horizontal lines

Placement on the Web-side of horizontal lines is based on the help of a single tag


. For additional attributes of SIZE, WIDTH, COLOR and ALIGN, the thickness, width, color and way of line alignment are changed.

Let's take a look at the splint of examples, which explains the placement of the horizontal lines:

1.


- a horizontal line on the entire side with a torso of 2 pixels.

2.


WIDTH = "200" ALIGN = "RIGHT"> - a horizontal line of green color with a width of 15 pixels, a width of 200 pixels and a vibrating line on the right edge.

3.


- a horizontal line of blue color on the entire side with a total of 25 pixels.

4.


WIDTH = "300" ALIGN = "LEFT"> - a horizontal line of red color with a width of 20 pixels, a width of 300 pixels and a left margin.

A selection of lines for some of the recordings of applications is shown in fig. 4.2.

Mal. 4.2. Lines on the Web site



TABLES

folding tables

The creation of tables is created for the help of a paired tag

. This tag creates a table in that area, de vin of data
in HTML code.

Whether the table is folded in rows, and the rows - in the middle. For the formation of a row and in the middle of the tables, the following key words are used:

... - new row;

... - header center;

... - zvichayna komіrka tablesі.

Qi tags are written in the middle of a paired tag

.

Tables are formed in rows - one row is specified in order and the number of middle rows is indicated in it, then another row, etc.

In order to take a table on the Web-side, it is presented in fig. 5.1, you need to type the following HTML code:

Side with table

Mal. 5.1. Side with table

The text in the middle of the headings in the tables (Fig. 5.1) is displayed in bold-face type with the center of the middle, and in the middle of the text is not visible and is shown on the left edge.

Next, specify what is hovered in the HTML code of the side tag

Cars Price Ford 5000 golf 6000
Delete the BORDER attribute with the value "1". Tse means that in the table, pointed to fig. 5.1, the community of the old cordon is old
1 pixel. how to write down

,

then the community of the old cordon will be more expensive than 6 pixels. So that the cordon of the table is not displayed, it is necessary for the BORDER attribute to include a value equal to 0, or simply omit the entire attribute.

Hello new blog readers! In your article you know everything about those how to insert an image on html side . Do you have a small image, do you want to put it on your side or do you want to put a logo on your site? Everything is easy. After reading this article, you can insert pictures on your html side without any difficulties. For whom we will talk in detail about abstract img and some attributes, briefly look at the format of graphic files, such as gif, jpeg and png, as well as marveling at the new possibilities of HTML5, how to simplify the insertion of video and audio on the site.

Through those graphic data html text it is impossible to combine in one file, for their display on the site a different pidhid is placed, lower with other elements of html-sides. First of all, graphic images, and other multimedia data are saved in a few files. And for them to be promoted to the web-side, special tags are added, as a way to avenge messages on these files. Zokrema so tag є img tag. Having created such a tag with the address, the browser will immediately ask the Web server for a new image file, an audio or video clip, and only then will it display it on the Web side.

All graphic images and vzagali whether they are data, as they are saved in other web-side files are called vprovadzhenimi side elements.

First, insert pictures and look at the “img” tag in detail, learn a little about graphic formats.

Format graphic images.

Use anonymous different graphic formats, but browsers only support a little more. Let's take a look at three of them.

1. jpeg format(Joint Photographic Experts Group). Finish the popular format, stop for image capture. Keep the 24-bit colors and keep all the colors in the photos unchanged. But jpeg does not add clarity and imply fine details and text in images. JPEG is used mainly for taking photographs. The file format may have the extension jpg, jpe, jpeg.

2. gif format(Graphics Interchange Format). The main advantage of this format is the ability to save a lot of images in one file. Tse allows you to create a lot of animated videos. In a different way, vin supports transparency. The head nedolіk tse pіdtrimka only 256 colors, which is no good for taking photographs. GIFs are mainly used to create logotypes, banners, images with clear cuts and clear text. The file format may have a gif extension.

3. PNG format(Portable Network Graphics). This format is used as a replacement for an old GIF, and also, in a real world, JPEG. Encourage transparency, but do not allow creating animation. Danish format can be png extension.

When creating sites, play vicorist images in JPEG format abo GIF, ale іnodi vikoristovuyut PNG. Golovne rozіbratisya in some kind of vipadka what format is better vikoristovuvat. For short, then:

    JPEG is the best choice for capturing photographs or similar images to avoid text;

  • GIF wins are mainly for animation;
  • PNG - format for everything else (icons, buttons, etc.).

Inserting images in html side

So, how do you still insert an image on a web page? Insert image allow single img tag. The browser places the image in that section of the web page, where the img tag is used.

Image embed code in html the side may look like this:

Place the Danish html-code on the image web-site, as it is saved in the image.jpg file, which is in the same folder with the web-site. How could you mark the address of the picture indicated in src attributes. What did I already tell. For example, the src attribute is a language attribute that serves to specify the address of an image file. Without the src attribute, the img tag doesn't make sense.

I’ll give you a link to the application of the application, the address of the file from the images:

insert this html-code on the side of the picture with the name image.jpg, as it is saved in the images folder, sorted in the root of the website.

In the src attribute, you can specify not only the reference to the image. Since the images are taken in the same order with html-sides, the skin file of the images has its own url-addresses. That's why you can insert the url-address of the image into the src attribute. for example:

Paste the Danish code on the image side of the site mysite.ru. The URL address should sound like a zastosovuetsya, so you indicate on the image that you know on your site. For images, they are saved on your site more often than vikoristovuvaty vodnosnі possilannya.

The img tag is a row element, so it’s better to place it in the middle of the block element, for example, in the middle of the “P” tag - a paragraph:

Let's practice and put it on our side of the previous articles about html image. I will create a folder “images” with the html file of my side and place a file with the image “bmw.jpg” there, which looks like this:

Then the html-code of the side of the inserted image will be like this:

I marvel at the result displayed in the browser:

As a matter of fact, there is nothing foldable in the posted images on the web pages. Let's take a look at some other important attributes of the "img" tag.

alt attribute - as a fallback

Since the files with images are saved only in the web pages, then the browser will have to work for a while to save them. And what if the image on the side will be richer and the portability of the connection is small, even on the edge additional files need a little time. And even more so, the image was removed from the server without your knowledge.

In these cases, the web page itself will be successfully occupied, only the replacement of the image will be more rectilinear. To that, schob vodomiti koristuvachevі Іnformatsiyu, scho imagine the image zastosovuєtsya. For the help of this attribute, the text should be replaced in such a way, which will be displayed in an empty rectangle until the image is taken advantage of:

I approximately look like this:

Let's resize the image

A couple more attributes of the img tag have been lost, you should know about them. This pair of attributes widthі height. You can twist them to show the size of the image:

In both attributes, the expansion in pixels. The width attribute tells the browser what width the image can be, and the height attribute what height. Tsі two attributes can be zastosovuvat at once and okremo. For example, if you enter only the width attribute, the browser will automatically take the height of the proportionally assigned width, and also in different variations of the height attribute only. If you don't specify these attributes, then the browser will automatically change the size of the image before displaying it on the screen. Varto is less respectful that the display of the image is a little faster to speed up the browser robot when the side is displayed.

On the topic of inserting an image on the side, for now everything, let's take a look at how to insert audio or video on the site ...

Embed video and audio for help HTML 5

The new html5 specification now has a bunch of new tags to help you easily embed multimedia files. Tse persh for all costs video and audio.

for insertion audio HTML5 Nada boy tag AUDIO. The addresses of the file, in which the audio clip is saved, are indicated for the help of the src attribute already known to us:

The "audio" tag is created on the side of the block element. The browser will not play the audio clip for the lock. What would you say about it, in the abstract of audio it is necessary to indicate a special attribute autoplay. Particularly, more wine is not important. To finish one presence of the attribute in the abstract, so that you can start working.

Because of the captivity, the audio clip is not displayed on the web-side. Also, put the attribute without a value in the "audio" abstract controls, The browser is displayed in that section of the web page, where the audio tag is affixed, controls for the creation of an audio clip. They turn on the start button and pinning the alarm, the alarm scale and the volume control.

As it was said, HTML for today is the basis for writing a web page for the All-World's Web. at curated CSS turning the code on move HTML fundamentally change. You can say goodbye to the reprofiling of ungracious HTML tags just to reach out to others visual effects. About some HTML tags in attributes, such as, for example, an old tag ...

Golovna

Lock up the site and start doing business!

This phrase can be felt and slandered on rich sites, but it’s not for nothing!

website tse face of the company. І він є the most current and effective channel of communication with a potential helper. Only the ability of the Internet to allow a site in the world to win all methods of communication informational alert to the bark. Text, audio and video information can be submitted within one site for familiarization with them.

For help software The site can accept payments, make phone calls, maintain data bases, edit and accept faxes, exchange SMS notifications and send a lot of other data. current internet the website is the center of information not only for a company, but also for the Internet.

It is the only way to effectively and at the same time simply and scientifically convey your ideas or expand it to the widest audience. І for today Web-documents written in movi hypertext layout HTML continues to be the main form of data representation in the Web environment.

The most important advantages of HTML are:

  • simplicity that allows HTML to be read in the shortest terms.
  • the possibility of creating powerful web pages
  • And HTML works exactly the same on all current platforms, no additional payment is required. І dosit quickly be-yakim accessible text editor, For example Notepad.

In this site, I tried to describe in detail the entire process of hosting the Web site, and the very publication of the finished project on the Internet, I would like to give access to the new one to all coristuvacha.

I'm afraid my articles will be more corny, even if I'm not a programmer myself, or else I'm afraid of a robot.