Which tags define the visible part. Tags - what is it and what are they
Which tags define the visible part. Tags - what is it and what are they
02.09.2019OS
We looked at an example of creating a simple page, where comments were given on some html tags, because it seems to me that it is better to first show something with an example, and then move on to a more detailed description. That is why the creation of the page was considered in the second lesson, and more detailed in the third.
So, below are descriptions of common html tags that are used on almost every page of the site. Believe me, they are already enough to write a whole site.
html tag list
1. HTML tag (for paragraphs)
- displays a text paragraph (allows style, class, id attributes). The most common tag, since text is most often placed in it (however, it was created for this).
For example, html code:
Text paragraph number one
And this is another paragraph.
Text paragraph number one
And this is another paragraph.
You can also add the style parameter to the tag:
With these different values, you can edit the appearance of the font. You can read about these parameters in a separate lesson: styles in html and the css font property.
You can also set the CLASS and ID attributes. For instance:
2. HTML tag and(highlight in bold)
AND - two tags that allow you to make the font bold. There is no difference between these tags.
Let's take an example. HTML code:
thumbnail
Transforms on the page to the following:
thumbnail
You can also set the CLASS and ID attributes (as in the case of Note
These tags have little effect on the ranking of documents in search engines, so it's best not to use them pointlessly.
3. HTML tag (creating italics)
- italic font (allows the style, class, id parameter)
For example, html code:
italic text
Transforms on the page to the following:
4. HTML tag (underlined text)
- underlined font (allows style, class, id parameter)
,...,- heading tags inside the content (allows the style, class, id parameter). Moreover, the smaller the number, the greater the weight and size (by default) of the text enclosed in these tags.
For example, html code:
Heading h1
Tag
used for page title (same as title)
These tags should only be used for their intended purpose, i.e. only when the article needs a title. This is because the tags
,...,have a big impact on search engines. If you use them correctly, then the chances of getting to the top lines of the issue are very high.
7. HTML tag
(alignment)
- aligns the content in the center.
For example, html code:
This text will be in the center
Transforms on the page to the following:
This text will be in the center
Note
- for text
...
- for everything (eg image)
8. HTML tag (subscript)
- Displays subscript font.
For example, html code:
regular text, subscript
Transforms on the page to the following:
Plain text, subscript text
9. HTML tag (superscript text)
- Displays superscript font.
For example, html code:
regular text, superscript
Transforms on the page to the following:
Plain text, superscript text
10. HTML tag ,
, - displays the font one pixel more/less than the current size (allows the style, class, id parameter).
For example, html code:
regular font, this font is one pixel larger
Transforms on the page to the following:
Regular font, this font is one pixel larger
11. HTML tag
(create lists)
Outputs a list (allows the style, class, id parameter). Each new element is written between
and
.
For example, html code:
List:
first element of the list
second element of the list
Transforms on the page to the following:
List:
first element of the list
second element of the list
12. HTML tag
(create tables)
- creates a table (allows the style, class parameter). Each new line is created by tags
, and the column
.
For example, html code:
1-row 1 element
1-line 2 element
2-row 1 element
2-row 2 element
Transforms on the page to the following:
All tag features
13. HTML tag (line break)
- transition to the next line, is a single tag.
For example, html code:
Line 1 2-line 3-line And this text will be on the 3rd line, since there was no transition
Transforms on the page to the following:
1-line 2-line 3-line And this text will be on the 3rd line, since there was no transition
14. HTML tag (horizontal line)
- draws a line, is a single tag (allows the style, class parameter).
For example, html code:
Some text above the lineAnd this text will be already under the line
Transforms on the page to the following:
Some text above the line And this text will be already below the line
All tag features will be discussed in a separate lesson: .
16. HTML tag (text formatting)
- for formatting text, changing style, etc. (allows the style, class, id parameter). It has no weight in the eyes of search engines, so you can use it as much as you want.
For example, html code:
This text is green and its size is 15px
Transforms on the page to the following:
Note
The similar tag is .
17. HTML tag
- creating a form on the page (allows the style, class parameter).
For example, entering a login and password, any buttons, any registration form - all these are forms.
18. HTML tag
(create blocks)
- serves to create blocks on the page (allows the style, class parameter). Previously, tables were used mainly for markup on pages. After the tag appears
the task is made easier. Almost all sites contain
blocks as a convenient alternative to tables.
Basic html tags are the base on which almost any website/blog is built. From this article you will learn exactly those 20% of tags that you will always need.
As in any language, the 20/80 pareto rule applies here too (20% of cases are 80% important to achieve the desired result), which means that it is enough to know only 20% of the codes in order to confidently achieve your goals in website building.
HTML is not a programming language, because it is a hypertext markup language, which speaks for itself, it allows you to mark up blocks on pages for correct display, to make text markup for web pages. Also, with its help, links are made from one page of the site to another. All links on the Internet are created using the hypertext part of the html code.
It's the simplest language ever! If you decide to study it, it is important to understand from the very beginning that there is no difficulty in this. We can say with confidence that it is much more difficult for children at school, in the informatics lesson.
So let's get started. It is better to write codes in a notepad, which is included in the standard programs of the Windows operating system or in the free Notepad + + program.
First, let's define what a tag is. A tag is a cell of the html language itself, from which it is generally built. By tags, browsers understand how to display text, where to insert pictures. Tags are the markup elements themselves.
HTML tags for creating a site frame
Tags are paired and not paired. Paired rooms open and close, i.e. there is a backslash "/" in the closing ones.
The first thing that should be in any html document when creating a blog page is:
- tell the browser that everything in between is html code;
- from English. "head", contains the name, encoding, meta tags for search engines;
TITLE- meta tag, mainly for search engines, inside contains the name of the document, displayed at the top of the browser;
- a single tag indicating the language encoding to the browser, where windows-1251 indicates that the text of this page is in Russian (windows-1252 is for English);
- for site keywords;
- a summary of the page;
DOCUMENT BODY- from English. "body", contains the entire page of the site.
These were standard html code tags, with which, without changes, all pages of the site / blog should begin in this form:
List of html tags in the body of the page
Between tags
the body of the site page itself will be located where:
header
- the most important 1 level;
With
subtitle
on
subtitle
- subheadings of levels 2, 3, 4, 5 and 6, respectively;
anchor links— link, where » target=»_blank»» is an attribute responsible for opening in a new window, » title=»» is the name of what the link will be;
and — tags to be highlighted in bold. "" are deprecated and recommended to use " »;
- for italics;
- a single tag responsible for inserting an image on the page;
- "p" from English. "paragraph", which means it divides the text into paragraphs. Left-aligned by default;
- a logical tag meaning the end of the line and the transition to the next one;
— attribute aligning the text to the center;
- attribute aligning text to the right;
—
color="green" is responsible for the color of the text. In this case, it's green. The word "green" is usually replaced by a code from the hexadecimal color system, for example: "#088f47";
face="verdana" - an attribute indicating the font in the text;
size="3" - font size;
first
second
third
- numbered list;
word
word
word
- bulleted list;
HTML tags for creating a table
There can be many tags inside the table itself, these are changes in the color of the table border, alignment of words inside the table, etc., but since the article is about the main tags, we will focus only on tags for creating the table itself.
- the tag responsible for creating the table, where "1" is the width of the table border, where "450" is the width of the table, and you already know "center";
- the tag inside "
' and creates a row in the table;
- creates a column in a row, is inside the tags "
". "150", as you probably guessed - the width of the column;
Fully html table tags look something like this:
cell number 1
cell number 2
cell number 3
cell number 4
cell number 5
cell number 6
I emphasize once again that these are the main html code tags and you can make a lot of changes to it. And it is also worth noting that the html code itself is a template, without css, in general, it will be impossible to do something worthwhile with it. Only all together, html and css work wonders, but something simple can be done without deep knowledge of css, purely on html.
Video lesson on the topic - “What is HTML? indexhtml file":
Please share if you like it:
You might also be interested in knowing:
In the HTML language, everything that you write in an HTML document will be displayed on the browser screen in solid text, that is, the browser ignores line breaks, and several spaces you type in a row are replaced by one.
Tags are control commands that were invented in order to format text, i.e. tags tell the browser how to display the part of the text enclosed in tags. To create a tag, HTML code is entered between angle brackets, which is intended only for browsers. Site visitors do not see the tags.
As noted above, all tags start with an angle bracket.< и заканчиваются угловой скобкой >. The opening angle bracket is followed by the name of the tag (command).
For example, tag is intended to emphasize text, browsers display such text in italics. When the browser encounters this tag, it switches to italic formatting of the text following the tag.
Consider an example:
This text is normal. This text is italic.
Tag is called a start or opening tag, which means that the browser includes a specific command (in this case, writing in italics). Most tags have a pair in the form of a closing tag that disables the command.
The end tag looks the same as the start tag, but starts with a slash. So the end tag for italics is - .
Consider an example:
This text is normal. Attention! Italics. This is again a regular font.
As you can see, the browser sequentially analyzes the HTML document in search of commands (tags) and applies or disables various text formatting options. The browser displays formatted text (everything that is not a tag) in its window.
The process of inserting tags into plain, unformatted text is called HTML document markup, and tags are markup characters. When writing tags, the case of letters is not taken into account, the tag can be written in both lowercase and uppercase letters, but it is still recommended to use uppercase letters.
The following are examples of basic HTML tags, with an explanation of their use, and examples of how they are used in an HTML document.
Titles
There is a special tag for specifying headings in HTML. There are 6 levels of headings in HTML, ranging from the most important declarations to the least important.
HTML tags is the basis of the HTML language. Tags are used to delimit the start and end of elements in markup.
Every HTML document consists of a tree of HTML elements and text. Each HTML element is identified by a start (opening) and an end (closing) tag. The start and end tags contain the tag name.