HTML attributes: views and applications. HTML-directory
Hypertext Markup Language HHas a wide selection of tags for giving to the sitepleasant appearance. Over time, a novice web designer understands that just 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. It is the attributes of HTMLallow you to assign tags to certain properties, supplement and modify their contents.
Attributes are prescribed in the opening tag andconsist of two parts. The first is the 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. HTML Attributesvary 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 you can apply to different tags. They are responsible for the location of the element on the page, its height, width, color and other visual effects. One such -Align,which can be assigned valuesright, leftcenter.It aligns the tag horizontally, so it can be useful for most markup elements.Valigndoes the same, but vertically. It can be assigned valuestop, bottommiddle.The following universal attribute -bgcolor,responsible for the background color. Its value is indicated in the form of a numeric code meaning one of the colorsThe background can be an image if you use the attributebackground.
An element can be given a name that will be displayed when you hover over it. To do this, use the attributetitle,the value of which is determined by the user. There is another similar attribute, which serves to create a unique identifier for the element. This attribute is calledand allows the creator of the site to set the style for a particular tag. To work withuse an attribute calledclass,which will be treated as a tag name in cascading style sheets. The width of the table, images or cells can be set withwidth,and height - using the attributeheight.There are other global attributes, but they are hardly necessary for a beginner.
HTML tag attributes
There are several useful attributes that affect the entire Hdocument. Some of them can be applied to individual fragments, for examplelang.This attribute specifies the language of the text in theweb page. Why is this necessary if the site looks correct and does not specify a language? In fact, some characters are displayed differently for different languages. For example, quotes for English look like this -"...",and for the Russian one like this, "...". In some cases, the use of it is necessary, but often you can do without it. Attributexml: langperforms a similar function, but it is used in documentsXHTML.
You can specify not only the language of the document, but also a special hint. It pops up when you hover over a web page and is set using the attributetitle.There is one more attribute for the tag<html>,specifying the namespace of the documentXHTML.His name -xmlns.The value of this attribute is a reference -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 The first of them is calledfont-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 withfont-style.This option can make the font oblique or mark it in italics. Values -normal(normal), italic (italics) andoblique (inclinedThe following useful attribute for cascading style sheets is calledfont-variant.With its help, you can select text with special capital letters. Havefont-variantonly two values -normalandsmall-caps.
Another attribute for the font is calledfont-weightand is responsible for the thickness of the text. It can be assigned a valuenormal,if you need letters of standard thickness. For a light text,lighter,and for bold -bold.Bold text is indicated in this attribute asbolder.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. Using the Attributefont-sizeSpecify the font size. It can be designated in points (pixels (and percentages (%). To get a standard font size, set this attribute tonormal.
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 attributeline-height.This parameter is set by specifying the exact value in pixels, percentage or multiplier. Attribute value isnormal.You can add beautiful effects to the text, if necessary. For this, there is an attributetext-decoration.Assign a value to itnone,if you want to remove all design effects.UnderlineAdds an underscore to the text, andoverline -line above the text. Valueblinkmake the text blinking andline-throughcross it out.
Another useful attribute -text-transform.If you assign it a valuecapitalize,then the text will begin with capital letters. Valueuppercasewill make all letters uppercase, andlowercase,conversely, lowercase. To remove all effects, set this attribute tonone. HAstro-indent the first line will helptext-indent.It can be assigned a value in pixels or percentage. -align -the attribute responsible for aligning the text. 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 creatingweb pages, you have to remember a lot of 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,remember which is difficult and inappropriate. Therefore, even experienced web designers keep an HTML-guide 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 fix the material, try applying the knowledge gained in practice. Learn the languageHTML,and it will bring you a lot of positive emotions, as well as a solid income.