Basics of HTML: the basic rules of the HTML language, a description of the structure of the HTML page, notes on the structure of the HTML document between HTML elements.
An HTML document is a basic text document that can be created both in a basic text editor (Notepad) and in specialized code (Notepad++, Visual Studio Code, etc.). The HTML document is extension.html.
An HTML document consists of a tree of HTML elements and text. The skin element is indicated in the output document by the head (opens) and end (closes) tags (behind the rare mark).
The start tag shows where the element begins, and the end tag shows where it ends. The tag that closes is created by adding a slash / before the tag name: … . Between the front and closing tags there is a content tag instead.
Single tags cannot be stored in the middle, they are written as attribute values, for example, the tag create a button with the text Button in the middle.
Tags can be nested one into the other, for example,
Text
. When inserting traces, follow the order in which they are closed (the “Matrioshka” principle), for example, the leading entry will be incorrect:Text
.HTML elements can have attributes (global ones, which apply to all HTML elements and are valid). Attributes are written to the element's name and value, which is specified in the attribute name="value" format. Attributes allow you to change the power and behavior of the element for which the smell is specified.
A skin element can be given a class value and at least one id value. Multiple class values are written using a pass, . The class and id values must be formed from letters, numbers, hyphens and lower letters and must begin from letters and numbers.
The browser looks (interprets) the HTML document, its structure (DOM) and displays it according to the instructions included in the file (style sheets, scripts). If the layout is correct, the browser window will display an HTML sidebar to contain HTML elements - headers, tables, images, etc.
The process of interpretation (parsing) begins, the first lower web page is imported into the browser. Browsers parse HTML documents sequentially, parsing CSS and matching style sheets with side elements.
An HTML document and two sections - a header - between tags ... and a subpart - between tags ... .
Web site structure 1. HTML document structureThe HTML language follows the rules that apply to the file type of document (Document Type Definition, or DTD). A DTD is an XML document that identifies tags, attributes, and their meanings for a specific type of HTML. For the skin version of HTML there is a local DTD.
DOCTYPE indicates that the web page is displayed correctly by the browser. DOCTYPE indicates not only the HTML version (for example, html), but also the DTD file on the Internet.
...
The elements found in the middle of the tag create the document tree, the so-called document object model, DOM (document object model). This element is the root element.
Small 1. The simplest structure of a web page
To understand the interaction between the elements of the web page, you need to look at the relationships between the elements. The entries between multiple inserted elements are divided into father's, daughter's and sister's.
An ancestor is an element that contains other elements from itself. For the little one, the ancestor of all elements is є. At the same time, the element is the ancestor for all tags that are located in the new one: ,
, , etc.
A pad is an element formed in the middle of one or more types of elements. For example, it is a flatbed, and an element
Є on the ground one hour for і.
Batkovsky element is an element associated with other elements of the lower level, and is found on the tree for them. 1 per baby. Tag
And even more so for Father's sake.
A child element is an element that is directly subordinate to another element of a higher level. For the little one 1 lishe elementi, ,
I have 100% subsidiaries.
The sister element is an element that is similar to the ancient Father’s element from the analyzed ones, so called elements of the same level. For the little one there are 1 elements of the same level, just like elements, and
And among themselves as sisters.
1.1. Element 1.2. elementSection ... contains technical information about the page: title, description, keywords for sound machines, coding, etc. The information entered does not appear in the browser window, so you must enter data that tells the browser to process the page.
1.2.1. elementThe obov'yazkovy tag of the section is the tag. The text placed in the middle of this tag appears in the title row of the web browser. The length of the title must be no more than 60 characters to fit within the title. The header text must provide as much description as possible instead of the web page.
1.2.2. elementThe unnecessary tag for a section is a single tag. With this help, you can set a description instead of the page and keywords for search engines, the author of the HTML document and other metadata authorities. An element can contain a number of elements, which means that when combined with the attributes that are used, they carry different information.
The description instead of the page and keywords can be indicated in many languages, for example, Russian and English:
You can block this additional tag or allow indexing of the web page by search engines:
To automatically re-enable the page after an hour, you need to quickly update the refresh values:
The page will be re-visited in 30 seconds. To transfer the message to another page, you need to specify the URL in the url parameter:
. In practice, it is possible to determine the place of formation of these main tags based on their nature. Because tags, as well as related ones, close tags are omitted, then the browser program itself can determine where the culprit is. However, it is not recommended to omit these tags when creating Web pages.
The simplest correct HTML document.
< HEAD >
< TITLE >Document title TITLE >
HEAD >
< BODY >
BODY >
TagsHTML
HTML language is made up of special indicators - tags. They can also be called commands, instructions or HTML codes.
A tag is an instruction to the browser indicating how the text should be rendered. All tags begin with the less-than symbol (). A couple of different symbols are called heel arches. After the open shroud, go keyword What does the tag mean?
The skin tag in HTML has special purposes. The register of letters in the names of tags is not significant - you can edit both small and large letters, if you want to edit large letters so that the tags are consistent with the original text of the document.
There are two types of tags – paired and unpaired.
Guys tags– what opens and closes, similar to the round arms of an algebraic expression. The stench flows into the text from the place where it is written to the place where the end sign is indicated (tags that are closed begin with the oblique rice symbol (/).
For example,< HTML >HTML >,< P >P>, H 3>
Unpaired tags give a one-time effect at the place of their appearance, there is no need for the one that closes.
For example,
, ,
The tag carries information about the Web site and is not displayed on the browser screen: it provides information about the coding of the Web page, about the author, as well as a set of search keywords that display the site.
butt.
Butt of the table
From the butt you can see that the page of the vikory code W Windows-1251 is the most expanded to date, it is enough to immediately insert this tag in this view on your page; author of the story – Ivan Ivanov; The side is dedicated to creatures.
When the document is displayed in the browser, the tags themselves are not displayed, but rather affect the way the document is displayed. If a tag in the abstract specifies a keyword that is not present in the HTML text, the tag is ignored entirely.
Tag attributesTags that are added can often obscure attributes that contribute to the effect created by the tag.
Attributes are additional keywords, reinforced with the tag keyword and one with spaces.
Attributes can have meanings written after the equal sign (=). First, place the attribute values in the tabs (single or double). A row of paws is not guilty of placing the same paws in the middle. You can omit the tabs for attribute values that consist of the following symbols:
between hours;
hyphens (-).
symbols of the English alphabet;
You can also lower the tabs for attribute values that are formed from the next symbols (return to technical concept ):
characters of the English alphabet (A - Z, a - z)
digits (0 - 9)
between hours
hyphens (- )
Thus, WIDTH=80 and ALIGN=CENTER - shortcuts are allowed for WIDTH="80" and ALIGN="CENTER" .
Tags that are closed do not interfere with attributes.
apply it. FONT >
Horizontal alignment B >TD > Centered | ||||||||
Vertical alignment B >TD > valign=top > Along the top edge of TD > | Centered TD > | Along the bottom edge TD > TR > TABLE > As a result, we come up with the following table: Horizontal alignment Centered Livoruch Right-handed Virus according to Along the top edge Centered Along the bottom edge
Success N p/n Nickname School ClassPractical robot No. 9 Meta: learn how to create and format simple tables using the text editor Notepad. Create a new Web page that may look like this in the browser: NicknamePhone number Petrova A.I. 31-74-16 Smirnov V.P. 46-29-89 The color of the table background is gray, the width of the table frame is 1. In the element, enter the name of the page “P/r No. 14”. Look at the created Web page in your browser window. Go back to the file saved in Notepad. Telephone registry NicknamePhone number Petrova A.I. 31-74-16 Smirnov V.P. 46-29-89 The background color for the middle of the first row is light green, the background color for the middle of the other rows is silver, the width of the table frame is 5. Look at the web page in your browser window. Save your money. Combining rows or standing in the middle . When folding the table, it is necessary to merge (merge) a number of rows or stacks into one center. For which there are attributes: colspan - indicates the number of rows combined in one middle (per row = 1), rowspan - indicates the number of rows combined in one middle (per row = 1). Apply: 11 All the importance of such a table lies in the appearance of the rowspan="2" parameter, the number in which indicates the number of "sub-rows", then. literally how many rows were angry in the middle. Since in the symmetrical table we read left-handed-right-handed, then the same applies here, but why does the code have a number three in front of the number two? Everything is very simple - literally the code for the first row is deciphered as “composition, to place 1”, “complex, to place 3, which consists of two rows”, the code for the other row is deciphered as “composite, to place 2”. Yak bachimo, physical middle 3 lay down to the first row! Since we have rooms that are connected horizontally, then instead of the rowspan tag, the colspan tag is substituted, naturally, in this space, which occupies the area of many people). For example:
Practical robot No. 10 Meta: learn how to create folding tables using the text editor Notepad. Open the text editor Notepad. Create a new Web page that looks like this in the browser: Success p/pNickname School Class Chemistry scores 1 p/y 2 p/y Ivanov Petrov Sidorov The color of the first row of the table is aquamarine, the width of the table is 500, the width of the table frame is 3. In the element, enter the name of the page “P/r No. 10”. Look at the created Web page in your browser window. Go back to the file saved in Notepad. Layout of a Web page behind an additional table.
The layout of the Web page can be manually combined with an additional table. Various layout options are possible. Let's take a look at their actions. Small 4.12. An example of web site layout. First option Before such a layout, you can introduce “buoyancy” instead of the side, so that with a change in the size of the screen, the space has to fit in a narrower frame, so the text “flows” down. To avoid this, you need to select a fixed size for the table, so that the table appears unchanged even on a separate screen. Another option. The layout of the page is created behind an additional table with a width of 760 pixels, aligned in the center of the screen. In which case the screen size is less than 800x600 pixels, the width of the page is almost the entire screen, and in case the screen size is less than 800x600 pixels є 1024x768 and larger, create a table with a width of 760 pixels in the center of the screen and white fields on the sides of it. In this case, you can manually create a table that consists of three rows and one column. The top row will be under the page title, the other row will be under the Website menu, and the third row will be directly under the site (Fig. 4.13). Small 4.13. An example of web site layout. Another option If it is necessary to place pages in the middle of the text, be it illustrations, photographs, etc., then in this case tables are also used. At the bottom of the butt to the other center of the other row, a table is inserted, which consists of two rows and three columns. The first and third boxes of the first row have baby ones inserted, and the other box of the first row has the name of the side. Text is entered before all the middles of the other row (Fig. 4.14). Small 4.14. An example of web site layout. Third option Topic 5. Pidsumkov’s work “Creation of a Web site on a topic in the Notepad TR” Students at home develop and draw up a project for a Web site on paper that looks like a creative work, and then implement it in class using HTML language. _____________________________________________________________________________ A course of developments based on book I. Smirnov "To Web Design". Are you wondering how to create an HTML side page? For this you will need to spend a few hours, and you will know that you can create your first page for 5 dollars. HTML stands for HyperText Markup Language. In translation, this means “the language of hypertext markup”. It is important to understand that HTML is the programming of the site itself. All modern browsers can recognize it. Then they display the information in a manual way for the reader, as was previously intended by the author. This video has special tags. The skin tag determines its function. It's so rich. Ideally, you need to read everything. But basic knowledge is completely sufficient to get started. HTML BasicsBefore you create an HTML page, you need to know what it consists of. This movie has two concepts: element and tag. To indicate which element opens and closes, use the What Opens and Closes tag is displayed. It looks like this. instead As you read, the tag that opens and closes only “/” appears. The entire HTML document is a collection of these elements. You can create songs based on the structure of the document. The entire page is located between two tags. When you write the code, take charge of the icon and immediately put a tag that opens and closes. Also remember that the structure of an HTML movie has a hierarchy. Otherwise it is called investment. They are the most important, since all others are in the middle. HTML has two child elements:
The HEAD block displays various service information. This information is not displayed in the browser. For example, inserts for retailers, for any programs, for robots and much more. The most important thing is that there is no content here. The BODY section specifies the location of the document that will be displayed. You will immediately begin to open and close tags, which may contain up to 10 nested elements. In addition, for ease of use, it is recommended to insert tags to work with access. For example, yes.
So, let’s make sure that the tags that are equal to each other for the significance of the tags are equal to one, and the daughter tags are “in the middle”. This makes it much easier to find and search for the required items in the code. Otherwise, you can get lost. Also, to save space and body, you can work without access. So shy, so that the decision does not have an intruder. Rashtu needs to be creamed. How to create a simple side page in HTMLTo write code you need some kind of editor. It's so rich. Popular ones are Notepad++ and Adobe Dreamweaver. You can also use Vikorist's notepad. This is what the Notepad++ editor looks like. This is a very handy editor and at the same time costless. The main purpose of Adobe Dreamweaver is paid. The importance of editors assigned to writing in a notepad lies in the fact that special tags are highlighted. If you were not highlighted, then you wrote incorrectly. In order for the support to correspond to your language, it must be specified in the settings. Let's take a look at how to create an HTML side in a notepad. Let’s finish the technical part and then move on to adding tags. How to create a web page in HTML notepadTo get started, open the notepad. Then dial from someone what is indicated on the next screenshot. Call to write with your hands, and not just copy. If you write with your hands, you will better remember the entire basis of tags. After this file you can open it in your browser and enjoy the results. Now you can figure out how to create a web page in an HTML notepad. World Wide Consortium W3CThere is an organization like W3C that develops and promotes all standards for the Internet. All browsers comply with these standards and compile page markups (codes) in accordance with these rules. On the official website of HTML distributors you can find a table with all the tags and the rules for their use. Within the framework of this article, we consider the most important ones. Can you think what the rules might be? All these tags carry their own recommendation. Ix decal:
Before you create an HTML page, you need to take a look at what the HEAD service part contains. In the HEAD area there are both mandatory and optional tags. Place a title before the language tag. VIN is designated Heading. This applies to every document. And those that you see in the results of the Google search engine are the title tag. Let's move on to the BODY section. Find out what elements are and are not displayed in the browser. For example, comments are not displayed in the comments. They can be used for notes or as tips for other specialists who work in a team. It smells like Everything that is in between is evaluated by the program itself. Please note that you cannot insert a comment tag into another comment tag. Because only you will open it. An example of this contribution: continuation of the first comment --> The result will be better for the browser continuation of the first comment --> And the axis of the items won't be visible. Another tag, What's popping up Another text |