the Internet Windows Android

Tag size. HTML Tag Reference

483
For the site to look according to your design, you will have to change the size of the text or the size of HTML images. To do this, you will probably look for a tag " size"But soon you will realize that there is no such hypertext.

To set the size of fonts, images and other items to use CSS. Any visual changes in text or other elements must be performed using cascading style sheets! HTML is intended only for the structure.

The only way to change the font size is an outdated tag which has a size attribute. Keep in mind that this tag is missing in current versions HTML, and in the future it can stop supported by browsers! Change the size of the elements and styles of the site should be using CSS.

Font dimensions

CSS allows not only to change the size of the text, but also more subtly customize the typography of the site, change the size of the HTML images. Changes are amenable to font size, its color, register, drawing, an interstitial interval and other characteristics. Tag can only set the size and value, multiplied by default, which different browsers is different.

To get a paragraph with a 12PT font, you need to set it the Font-Size property:

h3 (Font-Size: 24px;)

This will change the size of the third level headers up to 24 pixels. You can add this property to the external table of styles, and this value will use all headlines.< h3>.

To apply additional typography styles to the text, add the following CSS rules:

h3 (Font-Size: 24px; Color: # 000; font-weight: normal;)

It will not only set the font size for third-level headers, but also make text black ( what does hex code of # 000 say), as well as set the inscription in the value " normal" By default, browsers display H1-H6 headers in the form of a bold text. This style will override the default value and make a font low-fat.

Image sizes

It is not always possible to specify the desired image size, as the browser can do it automatically. Browsers do not always cope well with this task, which is why the quality of mapping is strongly suffering. Therefore, before setting the size of the image in HTML, it is better to use graphic editor. And then prescribe their actual size in the webpage markup.

Unlike fonts to determine the size of the image, you can use both HTML and CSS. Using HTML, the size of the pictures can be set only in pixels. In CSS, the sizes can be set in other value. For example, in inches, centimeters and percentage. If you want the site to be with adaptive pictures, it is better to apply percentage.

To set an image size in HTML, use the tag With HEIGHT and WIDTH attributes.

For example, the image must be 400 per 400 pixels size:

height \u003d "400" width \u003d "400" alt \u003d "(! lang: image" />!}

To set the size of the image in CSS, use the HEIGHT and WIDTH properties. Here is the image to determine the size of which CSS is used:

style \u003d "Height: 400px; width: 400px;" alt \u003d "(! lang: image" />!}

Sizes of basic blocks on the page

Most often for the main blocks on the page set width. First you need to decide on the type of design: static or adaptive. It is necessary to decide whether you want to set the width in absolute units of measurement - pixels, inches, points? Or does the block size must be adaptive, and EM or percentages should be used to define sizes? To set the size of the main blocks, as in the case of HTML images in the size of the window, you need to apply CSS properties Height and Width.

HTML tags - the foundation hTML language. Tags are used to distinguish between the start and end of the elements in the markup.

Each HTML document consists of a tree of HTML elements and text. Each HTML element is denoted by the initial (opening) and final (closing) tag. The opening and closing tags contain the name of the tag.

All HTML elements are divided into five types:

  • empty elements , ,
    , , ,
    , , ,
    Used for storage for more information About page. This information uses browsers for page processing, and search engines - For its indexation. In block maybe several tags Since depending on the attributes used, they carry different information. Measurement indicator in a specified range.