Sometimes it is required to place a tag on the web page so that it did not carry out the function assigned to it, and itself was displayed on the screen. It can be demanded, for example, by drawing up textbooks on the HTML language, and also for reduction of examples of fragments of a code in this language.
The sponsor of placement P&G Articles on the subject "How to Add Tags on the Site" How to make references in the different color How to bind the reference How to make the stretching site
The fastest way of reduction on the web page of an example of a code in the HTML language consists in use of a tag. After it place a fragment of the text which you want to show, and it will be displayed in an invariable look, together with the tags placed in it. Then arrange the closing tag. This way has two shortcomings: first, it is not standard, so, the page with it can not pass validation, and secondly, he will not be perceived by the old browsers supporting the HTML specification lower than 4. In them tags will not be displayed on the screen, and to be carried out. Consider that the tag which is standard and supported by a large number of browsers cannot be used instead of as it does not disconnect performance of teams.
Rather universal way of the placement on the web page of a fragment of the text with tags is its insert in the form of the image. For this purpose start any raster graphic editor, create in him new drawing of the sufficient size, and then turn on the tool for typing (the button with the letter A or T usually is for this purpose used). Bring a mouse arrow to the left top corner of the image, press the left key, and then enter a fragment of the text or insert it from a clipboard the Ctrl-V keys. Crop the image (as to make it, depends on what you use the editor, for example, in GIMP for this purpose it is necessary to allocate a fragment, and then to select item of the Image menu - "Otkadrirovat allocation"). Keep result in the file of the GIF, PNG or JPG format (the first more preferably).
Place the created image in the same folder of the server, as the HTML file into which you are going to insert it. Then in the right place of this file place the following tag: where image-name.extension - a name of the graphic file together with expansion. If for any reason you placed the image not in the same folder, as the HTML file, instead of a name of the graphic file place a full way to it. Consider that the user will not be able to see the HTML code fragment inserted thus if in its browser display of images is disconnected.
Even more universal is the way of the placement on the page of HTML tags which consists in use instead of signs of their codes. For this purpose use the following codes: instead of < - - >. This reception works practically in all browsers irrespective of the fact how they are adjusted.