Lecture
Tag, tags (sometimes tag , from the English tag, pronounced /tæg/; the more correct term is descriptor ) — in SGML (in HTML, WML, AmigaGuide, and the XML family of languages) is an element of a hypertext markup language. For example, Wikipedia text enclosed between the opening tag and the closing tag (from the English small, meaning small) is meant to be displayed smaller than the main text. For example: This is small text, and this is big.(—).
In XML, a tag is an element of the document, and the text contained between the opening and closing tag is the content of the element.


Only two tags are used — the opening, or start, tag, and the closing, or end, tag. Depending on the implementation of the language, it is also possible to use a self-closing tag and an empty-element tag. For example, the paragraph-indent tag can wrap a paragraph between
, or it can be used in a single form up to the next
An example of an empty element:
The set of tags and their recommended interpretation are defined by the W3C organization.
In SGML, other characters can be assigned to enclose a tag (for example, curly braces), but in some subsets of this language (for example, HTML and XML) this possibility does not exist.
In addition, there are various subset-language systems with fewer capabilities. For example, web forums and bulletin boards use the BBCode markup language, whose tags are limited to square bracket characters: [ ].
For example, [url="http://ru.wikipedia.org"]Russian Wikipedia[/url] — a link in BBCode pointing to the Russian Wikipedia page.
A tag can have properties called attributes, which provide additional text-formatting options. They are written as name-value pairs, and a non-numeric value is enclosed in quotes.
For example, you can highlight a piece of text with a particular font (the tag) by specifying the font name and desired size in that tag: the text being styled
The tag name determines the type of the element. In HTML, the tag name only determines markup rules; so, the tag name «i» (for example Italic text) specifies that the text located between the tags should be displayed in the browser in italic style. XML is a more flexible standard. Tag names in it are not strictly regulated: users can introduce and use new tags for their own purposes (see XML).
For example, we can define for ourselves that with an element named «person» we designate the type of this XML element as a last name, first name and patronymic. And, say, the year of birth, as part of the information about that person:
tags should be a certain color.Thus, HTML is essentially unstructured text, while XML is a document with a hierarchical structure, which makes it possible to process the document: transforming data, searching for the elements you need in the document, and so on.
| Tag | Example | Rendering | Description |
|---|---|---|---|
| B | text | text | Defines bold text. |
| Big | text | text | Defines big text. |
| Em | Defines emphasized text. (Emphasized) | ||
| I | Defines italic text. | ||
| Small | Defines small text. | ||
| Strong | Defines strong text. Looks almost the same as bold. | ||
| Sub | Defines subscript text. | ||
| Sup | Defines superscript text. | ||
| Ins | Defines text that is inserted after a deletion. Usually underlined. | ||
| Del | Defines text that has been deleted (appears struck through). | ||
| Code | Defines text representing computer code. | ||
| Kbd | Defines text entered from the keyboard. | ||
| Tt | Defines text that looks as if it were typed on a teletype. (Monospace font) | ||
| Samp | Defines text that is a sample. (Sample). Almost like the examples in this text. | ||
| Var | Defines text representing a variable. Probably for various scientific papers. | ||
| Pre | Defines text that preserves all formatting characters, such as tabs, spaces, and line breaks. | ||
| Abbr | Defines abbreviation text. The title attribute can be used to write out the expansion. | ||
| Acronym | Defines acronym text. An acronym and an abbreviation are one and the same thing. | ||
| Address | Defines address text. Displayed in italics. | ||
| Bdo | A very fun tag. For those who write in ancient Hebrew. The dir attribute can set the text direction. «Rtl» — right to left, «ltr» — normal. | ||
| Blockquote | Defines the text of a long quotation. | ||
| Q | Defines the text of a short quotation. | ||
| Cite | Defines the text of some classic quotation. Something like «He who thinks clearly, states clearly» | ||
| Dfn |
Defines a term for which a definition will be given. (Definition)
|
Hyperlink (from the English hyperlink) — part of a hypertext document that references another element (a command, text, heading, note, image) within the document itself, or another object (a file, directory, application) located on a local disk or on a computer network, or elements of that object.
A hyperlink can be added to any element of a hypertext document and is usually highlighted graphically. In HTML documents, text links are highlighted in blue by default; when the mouse cursor hovers over them in the browser window, they change, for example changing color or becoming underlined. When navigating in a browser with the keyboard, text and graphic links are highlighted with a dotted rectangular frame. A previously visited link is usually highlighted in a color different from that of an unvisited link.
A "broken" link is what a hyperlink is called when it points to an object that is missing for some reason, for example if the document or file has been deleted or moved by the administrator of the resource it was located on, or if the resource itself is unavailable. Usually in such a case an error-code message appears on the page, but this does not always happen.
A hyperlink is a fragment of an HTML document and one of its basic elements:
To the user, a hyperlink is a graphic image, video, or text on a website, in an email, or in some other electronic document that establishes a connection and allows moving to other objects on the Internet.
To define a link in HTML, the tag is used, whose structure has the form Link text, where filename is the name of the file or the address on the Internet that needs to be linked to, and Link text is the text of the hypertext link that will be shown directly in the HTML document. You can also use the TARGET argument, which shows in which window the link will be opened (values - _blank (new), _self (current)). target="window name">.
For example, a hypertext link:
My works — links to the document my_work.html, forming a hypertext link in the form of the words «My works»;My photo album — links to the file my_photo.html, located in the photo directory of the root directory, or "./photo/my_photo.html" of the current directory, and forms a link in the form of the text «My photo album»; — links to a resource located on a remote server.Open in a new windowTo create a link to an e-mail address, the mailto: tag is used, after which you need to specify the recipient's e-mail:
a href="mailto:e-mail" Link text
When creating a mail hyperlink, you can specify the subject of the message being sent and the body of the letter. The subject and body fields are used for this. The subject of the letter is set in the subject field, and the body of the letter in the body field.
For example:
a href="mailto:e-mail?subject=Subject&body=Message body" Link text
Some browsers may support the function of navigating through hyperlinks using the Tab key. In doing so, the browser by default highlights hyperlinks in the order they follow in the page's text. The navigation order can be changed using the TABINDEX attribute of the a tag. To include a hyperlink in the list describing the new navigation order, you need to assign the TABINDEX attribute some positive integer in the range from 1 to 32767. To exclude a hyperlink from the list, you need to assign the attribute any negative number. When the user presses the Tab key, the cursor moves to the hyperlink with the smallest positive index value. If several hyperlinks are assigned the same index value, the first one selected will be the one that appears higher in the page's text.
Comments