ComputersProgramming

HTML attributes: views and applications. HTML-reference

TML обладает широким выбором тегов для придания сайту приятного внешнего вида. The hypertext markup language H TML has a wide selection of tags for giving the site a pleasant appearance. Over time, a novice web designer understands that simply marking up the text is not enough. Among the modern web pages come across real works of art. Wizards for creating websites play text fonts, sizes and location of elements as they want. позволяют присваивать тегам определённые свойства, дополнять и изменять их содержимое. Specifically, HTML attributes allow you to assign tags to certain properties, supplement and modify their contents.

Attributes

Attributes are prescribed in the opening tag and consist of two parts. The first is a name that is spelled in the space after the tag name. The second part is the value of the attribute, which is indicated after the "=" sign and enclosed in double quotes. разнятся для разных тегов. The HTML attributes vary for different tags. Most of them perform different tasks, but there are several common attributes. They can be applied to many elements of a web page.

A single tag can contain several attributes. They are written one after another and are located exclusively in the opening tag. The closing one can not contain any attributes.

Universal attributes of HTML elements

There are several attributes that can be applied to different tags. They are responsible for the location of the element on the page, its height, width, color and other visual effects. Align, которому можно присвоить значения right, left или center. One such is Align, which can be assigned the values right, left, or center. It aligns the tag horizontally, so it can be useful for most markup elements. делает то же самое, но по вертикали. Valign does the same, but vertically. top, bottom и middle. It can be assigned the values top, bottom and middle. bgcolor, отвечающий за цвет фона. The next universal attribute is bgcolor, which is responsible for the background color. RGB. Its value is indicated in the form of a numeric code, meaning one of the RGB colors . background. The background can become an image if you use the background attribute .

An element can be given a name that will be displayed when you hover over it. title, значение которого определяет пользователь. To do this, use the title attribute , the value of which is determined by the user. There is another such attribute, which serves to create a unique identifier for the element. id и позволяет создателю сайта задавать стиль для конкретного тега. This attribute is called id and allows the site creator to set the style for a particular tag. CSS используют атрибут под названием class, который будет рассматриваться как имя тега в каскадных таблицах стилей. To work with CSS, use an attribute called class, which will be treated as a tag name in cascading style sheets. width, а высоту - с помощью атрибута height. The width of the table, images or cells can be specified with width, and height using the height attribute . There are other global attributes, but they are hardly needed for a beginner.

HTML tag attributes

документ. There are several useful attributes that affect the entire H TML document. Some of them can be applied to separate fragments, for example lang. This attribute specifies the language of the text on the web page. Why is this necessary if the site looks correct and without specifying a language? In fact, some characters are displayed differently for different languages. а для русского вот так «...». For example, quotes for the English language look like this - "...", and for the Russian like that "...". необходимо, но зачастую можно обойтись и без него. In some cases, the use of lang is necessary, but often you can do without it. выполняет аналогичную функцию, но его применяют в документах XHTML. The xml: lang attribute performs a similar function, but it is used in XHTML documents .

You can specify not only the language of the document, but also a special hint. title. It pops up when you hover over a web page and is specified using the title attribute . , задающий пространство имён документа XHTML. There is one more attribute for the tag that specifies the namespace of the XHTML document . xmlns. Its name is xmlns. http://www.w3.org/1999/xhtml . The value of this attribute is a link - http://www.w3.org/1999/xhtml . No other values can be assigned to him.

CSS Font Settings

Some HTML attributes are used to specify a font in CSS. The first one is called font-family. It indicates the list of fonts that will be used in any element. The value of this attribute is the font name. The selected font can be changed with font-style. This option can make the font oblique or mark it in italics. (обычный) , italic ( курсив) и oblique ( наклонный ). The values are normal , italic and oblique . The next useful attribute for cascading style sheets is font-variant. With its help, you can select text in special capital letters. всего два значения — normal и small-caps. The font-variant has only two values - normal and small-caps.

и отвечает за толщину текста. Another attribute for the font is font-weight and is responsible for the thickness of the text. если вам нужны буквы стандартной толщины. It can be set to normal if you need letters of standard thickness. а для полужирного — bold. For light text, you should set the value of lighter, and for bold text - bold. Bold text is indicated in this attribute as a bolder. You can specify the thickness of characters in a numeric format. In this case 100 is a thin font, and 900 is the thickest version. задают размер шрифта. Use the font-size attribute to set the font size. пикселях ( px) и процентах (%). It can be designated in points ( pt), pixels ( px) and percent (%). To get a standard font size, set this attribute to normal.

Text properties

Using the proper use of attributes, you can change not only the font, but all the text. You can specify the line spacing using the line-height attribute . This parameter is set by specifying the exact value in pixels, percentage or multiplier. The value normal applies to this attribute . You can add beautiful effects to the text, if necessary. For this, there is a text-decoration attribute . если нужно убрать все эффекты оформления. Give it the value of none, if you want to remove all design effects. добавит в текст подчёркивание, а overline – линию над текстом. Underline will add an underscore to the text, and overline a line above the text. сделает текст мигающим, а line-through перечеркнёт его. The value of blink will make the text blinking, and line-through will cross it.

Another useful attribute is text-transform. то текст будет начинаться с прописных букв. If you assign it a value of capitalize, the text will begin with capital letters. сделает все буквы прописными, а lowercase, наоборот, строчными. The value uppercase will make all letters uppercase, and lowercase, conversely, lowercase. To remove all effects, set this attribute to none. астроить отступ первой строки поможет text-indent. H astroit indent the first line will help text-indent. It can be assigned a value in pixels or percent. - align — атрибут, отвечающий за выравнивание текста. Text - align - the attribute responsible for text alignment. The possible values for this parameter are left, right, center, justify. Do not try to immediately remember the basic attributes, at the initial stage the HTML-help will help you.

HTML Tags and Attributes

If you decide to master the art of creating web pages, you will have to memorize many tags. The HTML attributes are equally important, since without them it is impossible to create a website. Skillful use of these language components will allow creating decent web pages. Some tags have their own unique attributes, which are difficult to remember and inexpedient to remember. Therefore, even experienced web designers keep the HTML-directory at hand. In this there is nothing shameful, because you never know what tag or attribute you need today. However, it is desirable to remember the global attributes that can be applied to most of the existing elements. To consolidate the material, try applying the acquired knowledge to practice. и он принесёт вам массу положительных эмоций, а также солидный доход. Learn the HTML language , and it will bring you a lot of positive emotions, as well as a solid income.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.birmiss.com. Theme powered by WordPress.