HTML programming lessons for beginners. Page headings h1 h2 h3
HTML is the hypertext markup language that made the Internet what we know and love. It is thanks to this wonderful tool that sites look beautiful and modern, and also ensure ease of use. HTML simply arranges the elements of a web page into a user-friendly format. Its work is comparable to what people like MS Word or OpenOffice do. They turn a featureless mass of letters into a document that contains paragraphs, bold text, italics, tables, and even images. The HTML language does approximately the same thing, with the only difference being that its documents are displayed in the browser, and the capabilities of this tool are much wider than those of a text editor. Tags are used for markup - special teams, describing the structure of a web page. They are enclosed in angle brackets - so that the browser can distinguish them from the bulk of the text. Next, we'll cover the basics of HTML for beginners.
Visual editorsBeginners who have just set out on the path to learning HTML often start their work with programs that allow you to create websites without any knowledge. In them you can simply arrange elements on the screen the way they will be displayed in the browser. It would seem that this is the source of eternal grace that allows you to get rid of the majority of web developers. But not everything is so simple, since visual editors have a lot of shortcomings that make it impossible to use them in serious projects.
All of these programs create a lot of unnecessary tags that make the final page unwieldy and suboptimal. Of course, in our age high-speed Internet This matters less than it used to, but there are a number of reasons why a concise and well-written website is more practical than its counterpart created in a visual editor. A web page made in such a program will not be processed well search robots, since every kilobyte of code is important to them, and cumbersome and illogical code with a bunch is unlikely to suit their taste. In addition, editors often lag behind the times, becoming irrelevant, and spending resources on their development is impractical, since no professional uses these products. Therefore, anyone who wants to work in the website development industry must know the basics of HTML.
TagsAs mentioned above, tags describe the structure of a web page to the browser. Most of them have an opening and closing tag, but not all. For example, ..., where instead of dots there is content. The first one shows where the tag starts, and the second one closes it. There may be other page markup elements inside; they can be nested inside each other like a nesting doll. It is important to close tags in a timely manner so that the page is displayed correctly.
There are also single tags that do not need to be closed. In them, the content is located inside, just as it can be written for most HTML tags, and sets the properties of the element. It is indicated in the opening tag and looks something like this: attribute="...", where instead of dots there is the attribute value. Knowing tags is the first and most important step to master HTML. The basics of this art also involve understanding the structure of a web page.
Document structureEvery HTML document has a corresponding extension, for example Index.html. This way the browser can understand what it is dealing with and display the page correctly. It is advisable to store all files used to create a website in one directory, which will make your life much easier in the future. The basics of the hypertext markup language HTML require a clear understanding of document structure. It starts with a tag that tells the browser the version of HTML that is being used in this document. On this moment The fifth version of the language is current, so there is no need to invent anything here; you can safely insert the above tag at the beginning of any page.
Then there are the main paired structures that make up the “skeleton” of the site. The first tag, in which all the others are nested, is .... Anything outside of it is not recognized by the browser as a web page, so it opens the document and closes it. This tag is required for any document. It also contains several more required tags, which will be discussed below.
HeadInside the ... tag contains information of a technical nature that will not be displayed on the page, but is nevertheless important part HTML document. The foundations of the site are laid in this place; here the encoding is selected and the page name is entered. It is contained inside a required tag.... The title is displayed at the top of the browser, where you can also place a small icon that characterizes the contents of the page. It is advisable to immediately indicate the encoding of the document for its correct display. This can be done using the tag. Meta tags provide information about the structure of the page and are usually located inside the head.
LinkKnowing the basics of HTML also involves using cascading styling, or css. They set the properties of the elements that will be displayed on the page. A modern approach to this task involves placing characteristics such as color, height and location of the element into external file for greater convenience. To include a css file, use the tag. IN finished form it looks something like this: where href indicates the location of the file, and type indicates its type.
BodyIt is in this part of the HTML document that the visible part of the page is created. Everything that is done inside the "body" will be shown by the browser. It uses a huge number of HTML tags. The basics are text formatting, working with links, and basic tools for structuring a web page. To get started working in HTML, you just need to know the basic tags and be able to use them. Below are the most popular ones:
- - used to highlight a substring that will be subject to a special style described in css;
- - creates a link on a web page; the transition address is specified by the href attribute;
- - one of the most popular tags of our time; anyone who decides to learn the basics of the HTMLl language should pay special attention to it, since this is a block element, on the basis of which the lion's share of modern sites is made (parameters for blocks are set in css, and other blocks can be located inside this tag);
Selects a paragraph from the text; the content of the paragraph is between the opening and closing tags;
- - a numbered list whose elements are enclosed in a paired tag
- - a bulleted list, in which, just like in a numbered list, elements are designated by a tag
- - - document headings (the number indicates the heading level, that is, the main heading, and subsequent options are its subheadings; by the way, level headings are almost impossible to find on the Internet), it is also important to remember that there can only be one heading on a page;
- - thumbnail;
- - italics;
- - inserting a picture onto a website (this is a single tag, it does not require a closing tag, but it must include the alt attribute, which specifies the text for the image);
- - inserting video into a web page;
- - a tag that inserts an audio file into the document.
These are not all the tags you need to create your own web page, but they are enough to lay the basics of HTML for beginners.
CSSThe development of the HTML language has led to the fact that each tag has acquired a lot of attributes, and the requirements for the appearance of web pages have increased significantly. The code became cumbersome and inconvenient, it was difficult to read it, let alone adapt or change it. In addition, if your site has ten pages with a lot of headings marked in green, and you suddenly want to make them red, you will have to work hard, changing each one manually. With the advent of Cascading Style Sheets, this process has become simple and logical, and the HTML code has become much more readable.
Applying CSSTo create web pages, you need to know the basics of HTML and CSS, since now there is nothing to do in this area without knowledge of cascading style sheets. They set attributes for any element that apply to the entire document. This way you can set the color for all elements at once
In order to connect a css file to a document, there is a link tag. The principle of its use was described a little higher, but it is not the only option for combining all styles in one place. There is also a tag, which is located in the “head” of the document and allows you to write styles without using CSS files. It is not necessary to use one method or the other. They can be successfully combined to obtain the best result. To create a file with style sheets, you need to create a file with a .css extension, for example, Styles.css.
JavaScriptOften, a person who decides to start realizing that the tools that HTML offers are not enough for his tasks. The basics will allow you to create a beautiful page, but what if you suddenly need to make it interactive? For these purposes, there is a unique programming that interacts perfectly with HTML. It is called JavaScript, as it was conceived as the younger brother of the popular Java language. Today, these languages have acquired significant differences, and the gap between them is only growing.
JavaScript can extend the capabilities of HTML by allowing you to create and edit tags. Also, using this wonderful tool, you can work with Cokie, download data from the server without reloading the page, and make the site more interactive than HTML capabilities allow. This language also has limitations related to security. If JavaScript is not used on the server side, it will be executed under conditions that limit its capabilities, so that attackers cannot use malicious code on any computer.
EditorsHTML basics for a beginner require knowledge of the most convenient and practical programs for creating web pages. As written above, visual editors such as Dreamweaver and the like are not suitable for these purposes. So, should you write tags in a regular notepad? This option is also questionable, since a standard notepad does not have any special layout tools. Notepad++ can handle this task quite well. The big advantage of this product is that it is open source and distributed absolutely free. It has convenient syntax highlighting and automatic closing of tags. Notepad++ also provides a wide selection of interface languages, and its capabilities are easily expanded with numerous add-ons.
Sublime Text 3 is a program similar to Notepad++, but available for a fee. It was she who won the hearts of most developers. Sublime Text 3 is perfect for JavaScript, CSS and HTML. You'll have to learn the basics of working with it yourself, but it's worth it. It contains truly limitless possibilities for fine-tuning, which allows you to tailor the program to your needs as much as possible.
HTML and CSS Basics for BeginnersAs you can see, learning the art of creating web pages is not as difficult as it seems at first glance. Just a few months of practice will transform you from a timid user to a novice developer. Learning layout is much easier than mastering a programming language or Linux. In fact, there are not so many HTML tags; it is important to understand the practical aspect of their use.
Skill in working in Adobe Photoshop will not be superfluous in this matter. This program allows you to work with photographs, pictures and other graphic elements of a web page. At the moment, it is Photoshop that best copes with such tasks; it has few competitors. For those who do not like this Adobe product, there are Lightroom, GIMP, Illustrator and other programs with similar functions.
What does knowledge of HTML give?Web page creation skills are very relevant today, as the Internet is expanding by leaps and bounds. Every enterprise, even the smallest store, workshops and sports clubs - everyone wants to have their own website. And of course, for this they will need a developer who knows CSS and HTML. The basics are easy to master, after which it's a matter of practice. Since layout technologies are constantly evolving, front-end developers will always be in demand. Anyone who decides to devote himself to this interesting industry will never be left without work.
This section of the site is entirely devoted to two languages for creating a site, namely HTML and CSS. Here you can learn languages step by step, learn everything from the basics to the most difficult moments.
This section is built on the principle of step-by-step study of the material, therefore, before each title of a lesson on HTML and CSS, there is a number corresponding to the serial number of the lesson. This is natural if you want to learn everything from the very basics and not make a mess in your head. If you already know something about the HTML and CSS languages, then you can also find here the knowledge you are missing, or deepen what you have already learned.
This section contains lessons on HTML5 and CSS3 language standards, respectively, if there are any newer versions of these languages, they will also be reflected in the new lessons in this section, and you will definitely find out.
Probably every person who has encountered the creation of a website at least once in their life has certainly heard about such a combination as html and css, I can confidently say that if you want to make websites yourself, then you cannot do without knowledge of these two of things.
Once you have a general understanding of what html is in your head, you clearly have a mixed picture, and I think this is not surprising. It's time to move directly to practice and create your first HTML document.
Like the html language, CSS has its own characteristics, rules and structure. In this lesson I will tell you about the basic concepts of the CSS language, its structure, structure, and we will make your first CSS style sheet and learn how to connect a style sheet to an HTML document.
Selectors in CSS are the basis of the language itself and learning and understanding them is very important, so in this lesson I will tell you about several more types of selectors and describe their capabilities.
A very important point in creating a website is working with text, and as you understand, you also need to be able to work with text in html, and know what tags there are and how they can be used.
After you have learned all the HTML tags for working with text, now it’s time to move directly to CSS working with text, which will significantly expand your knowledge and capabilities.
CSS has a huge number of all kinds of convenient properties that qualitatively change the appearance, and we continue to study CSS working with text, and in this lesson, we will delve deeper into the topic of working with text and look at new text properties.
Working with images when creating from a website is one of the key points, both when creating a design, as well as when simply laying out or writing any materials for your website.
CSS significantly expands the possibilities of working with any html objects; in this lesson I would like to tell you in detail about the parameters that can be applied to images.
Everyone uses the Internet and everyone browses different sites, and probably everyone would like to place their website on the Internet, but this is not easy to do, there are many reasons for this. However, in order for you to be able to host a quality website, you just need to know the basics “ WEB programming", which is the HTML language. In this article we will look at the main elements, tags, attributes, and even write the first web page.
Hyper Text Markup Language - "HTML" ( hypertext markup language) many have long ceased to consider it just a programming language. Since the very concept of HTML includes various methods of designing hypertext documents, design, hypertext editors, browsers and much more. A user who has mastered this language gains the ability to do serious things using simple methods and, most importantly, quickly, which is considered very good in the modern world!
In the HTML language, you can create your own multimedia products and distribute them on CDs, and all these products, made in the form of sets of HTML pages, do not require the development of specialized software, since everything necessary for working with data ( Web browsers) have become part of the standard software on most personal computers.
- Element ( element) is a construct of the HTML language. This is an object that contains data and allows it to be formatted in a specific way. Any Web page is a set of elements. One of the main ideas of hypertext is the possibility of nesting elements.
- Tag ( tag) - start or end markers of an element. Tags define the boundaries of the action of elements and separate elements from each other. In the text of a Web page, tags are enclosed in angle brackets, and the end tag is always followed by a slash.
- Attribute - a parameter or property of an element. In other words, this is a variable that has a standard name and can be assigned a specific set of values: standard or arbitrary. Character attribute values are expected to be enclosed in straight quotes, but some browsers allow you to omit the quotes. This is because the attribute type is always known in advance. Attributes are located inside the start tag and are separated from each other by spaces.
- A hyperlink is a piece of text that is a pointer to another file or object. Hyperlinks are necessary to enable navigation from one document to another.
- Frame ( frame) - this term has two meanings. The first is the document area with its own scroll bars. The second value is one image in a complex ( animated) graphic file (similar to a still from a movie). It is also possible that instead of the term “frame” in specialized literature and localized software products you can find the term “frame” or “frame”.
- An HTML file or HTML page is a document created in the form of hypertext based on the HTML language. Such files have the extensions htm or html.
- Applet ( applet) - a program transferred to the client’s computer as a separate file and launched when viewing a Web page.
- Script or script ( script) is a program included in a Web page to expand its capabilities.
- Extension ( extension) is an element that is not included in the language specification, but is used to provide the ability to create a new and interesting formatting effect.
- CGI ( Common Gateway Interface) is a general name for programs that, running on a server, allow you to expand the capabilities of Web pages. For example, without such programs it is impossible to create interactive pages.
- HTML code is a hypertext document in its original form, with all elements and attributes visible.
- Web page is a document (file) prepared in hypertext format and posted on the World Wide Web.
- Website ( site) - a set of Web pages located in one place and interconnected.
- Browser ( browser) - a program for viewing Web pages. () - copying files from the server to the client computer.
- URL( Uniform Resource Locator) or uniform resource locator, the address of some object on the Internet, i.e. A typical URL for WWW looks like: http://www.name.domain/filename.
All elements of language can be divided into three groups. The first includes elements that create the structure of a hypertext document. The use of such elements is a necessary formality that cannot be neglected. The second group includes elements that create formatting effects. Their use is dictated by the specific requirements for the document, the imagination and competence of the developer. The third group includes elements that allow you to manage software installed and running on the client computer. Often such elements are created automatically when a developer uses a hypertext editor or similar program to insert an object into a document.
Although the HTML specification is a standard, new elements are being added to the language ( extensions). Therefore, some Web pages are more convenient to view using certain browsers. Extensions are created only by well-known companies that develop software for the WWW, and ordinary users can improve their Web pages through programming. Applets allow you to remove the limitations of HTML and give scope to the developer's imagination.
HTML versionsThe first version of HTML was developed in the early 90s by Tim BenersLee for one of the popular Mosaic browsers in the past. But at that time, neither the browser nor HTML itself had yet found a good use. HTML+ appeared in 1993, and this version also went virtually unnoticed. But the HTML language became widespread thanks to version 2.0, which appeared in June 1994. And from that moment on, the popularity of WWW has been increasing around the world. The standards included in version 2 have become so established that they are still used today.
HTML version 3.0, which appeared about a year later, introduced the ability to draw mathematical symbols ( integral signs, infinity, fractions, parentheses, etc.) using language elements. But the development of this project slowed down and did not gain further distribution.
In 1996, HTML version 3.2 appeared. This was a brilliant solution; it is enough to mention that frames were introduced into the language specification, which have now become very popular among website developers. To this day, all browsers support this version of HTML.
Official HTML 4 Specification ( Dynamic HTML) was developed in 1997. At this time, it was already obvious that the further development of hypertext would be carried out through web programming. This turned out to be much more effective than introducing new elements into the language.
Web page structureBelow is the code of the Web page, which is made in HTML, and using this page as an example, we will analyze its structure, but first, copy all the code into a regular text notepad and click “Save as” and save the file with the html extension, i.e. . after the name write.html
Structure of a web document Go to the end of the document Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 The first link is located here Should be located here
main text of the web page.
And I, for example, will insert here
several transfers,
so that you can
clearly observe
how does it work for you
links within the document,
otherwise if you have a large resolution,
You just won't notice the links being followed
HTML document notation. One of the principles of the language is multi-level nesting of elements. This item is the outermost one, since the entire Web page must be located between its start and end tags. In theory, this element can be considered as a formality. It has the version, lang and dir attributes, which are rarely used in this case, and allows the nesting of HEAD, BODY FRAMESET and other elements that determine the overall structure of the Web page. Naturally, all such documents end with an end tag.
< head >
The title area of a Web page. In other words, its first part. As well as previous element, HEAD serves only to form general structure document. This element can have lang and dir attributes.
< title >
An element for placing the title of a Web page. The line of text located inside this element does not appear in the document, but in the title bar of the browser window. This element greatly influences promotion in the search engine because search engines pay special attention to the TITLE tag. My advice: never do too much long text in this tag ( 65 characters is enough).
This element contains service information that is not reflected when viewing a Web page. There is no text inside it in the usual sense, so there is no end tag. Each META element contains two main attributes, the first of which defines the data type, and the second of which defines the content.
< body >
This element combines hypertext, which defines the Web page itself. This is the visible part of the document that is developed by the auto page and which is displayed by the browser. Accordingly, the end tag of this element should be found at the end of the Web page. Inside the BODY element, you can use all the elements intended for Web page design. Within the start tag of the BODY element, you can place many attributes that serve to set the entire page. Let's look at them in order.
One of the most useful attributes of this tag, which has an impact on the design of the page, is
background="path to background file"
A simpler background design comes down to setting its color
bgcolor="#FFFFFF"
The background color is specified by three two-digit hexadecimal numbers, which determine the intensity of red, green and blue colors (rbg).
Since you can change the background of the page, you can also change the color of the text. For this purpose there is the following attribute
text="#RRGGBB"
To set the text color of hyperlinks, use the following attribute
link="#RRGGBB"
You can also specify a color change for the user's last selected hyperlink
Header element. There are six levels of headings, which are designated as follows.
Heading
Heading
Heading
Heading
Heading
Heading
Level 1 heading is the largest, and level 6 provides the smallest heading. For headings, you can use an attribute that specifies left, center, or right alignment:
align="left" align="center" align="right"
To create a new paragraph, use the tag
And to move to a new line without creating a paragraph - tag
i.e. transfer occurs. It is not necessary to close these tags. Of course, if you do not use in the tag
The ALIGN element, which can set paragraph alignment:
Left
Centered
Right
The text between these elements is aligned in width
Horizontal line ( horizontal rule) is a very common element. Firstly, because it makes it very easy and convenient to divide a page into parts. Secondly, because the author of the page has a very small selection of such design elements. The element does not have an end tag, but has a number of attributes for left, center, right, justification:
- align="left"
- align="center"
- align="right"
- align="justify"
An HTML document can be very cumbersome, and not very convenient for the user who needs to quickly move to the desired section of the document. To do this, you can use the hyperlink mechanism. To do this, place the appropriate marks in the right places in the text.
Free text
In this case, a given line of the document is given a name, and therefore a hyperlink can be created to another part of the document, or even on another document, leading to that label.
To insert images ( Pictures) in an HTML document the following tag is used ( presented Full description attributes of this tag):
(list) were developed in HTML, no doubt influenced by the success of text editors. A list differs from ordinary text, first of all, in that the user does not need to think about numbering its items: HTML takes on this task. If the list is supplemented with new items or shortened, numbering continues automatically. In case of unnumbered HTML lists puts marks in front of each item: circles, rectangles, diamonds and other images. Ultimately, the list takes on a decent form. There are two groups of such tags: some define the general appearance of the list ( and allow you to specify attributes), while others specify its internal structure. You can use standard attributes in lists. There are several types of lists.
The most common is the unnumbered list ( unordered list). It is presented below:
- List item 1
- List item 2
- List item 3
The ul element is a kind of highlighting of a list. It allows you to separate one list from another. The li element represents each of the items.
TablesThey are one of the most necessary means of formatting data on a Web page. The main convenience is that the browser takes care of drawing the entire table. The size of the frame can be automatically adjusted to the size of the browser window and, of course, to the size of the lines of text and pictures in the table cells. In addition to everything else, tables allow you to solve many design problems: align parts of a page relative to each other, place pictures and text next to each other, manage color schemes, and so on. When creating tables, the principle of nesting is applied: inside the main table element (TABLE), a number of elements are created that define rows (TR), and inside these elements there are elements to describe each cell in the row (TD, TH).
In order to understand the structure of an existing table or develop new table, there is one rule that the sequence of elements describes the table from top to bottom and from right to left. For example, if a TABLE element is followed by a TR element, this indicates that a description begins new line tables. Everything behind this element will be placed on one line (from right to left). This could be a sequence of TD elements ( cells), another table and so on. After it appears new element TR, the description of the next line will begin, etc. until the end of the table (tag).
The table can be aligned horizontally using the align attribute:
- align="left" - left;
- align="center" - in the center;
- align="right" - to the right.
The table width can be set exactly in pixels or as a percentage of the page width in the browser window. For example: width=400 or width=50%
Two attributes are used to control the appearance of the frame. The fact is that the browser creates an image of the frame, simulating its three-dimensionality ( convex) using differences in illumination of the faces
ScenariosAlmost all web masters want their pages on the site to have modern look, were multifunctional, beautiful and dynamic. By standard means HTML is not possible, so use different means: applets, objects, cascading style sheets and so on. But the most popular and widespread type ( reception) is the use of scripts.
A script is program code that is included in the text of a page as source text and is executed by the browser when the page is viewed. The script can be written in JavaScript, developed by Netscape, or in Visual Basic Script ( VBScript), developed by Microsoft.
This tag allows you to separate the script program text from other page information. The SCRIPT tag must include a language attribute, which specifies the language and can take the following values:
- javascript - code in JavaScript;
- vbscript - code in VBScript language.
The type attribute can also indicate the language type, although its use is not required. In order not to break all the rules, you can place the following definition inside the element:
type="text/javascript"
One of the coolest features of scripts is the ability to change the contents of a page as a result of program execution. But this is only a feature, not a rule. Using the defer attribute (which does not accept any values) you can “tell” the browser that such changes will not be made. In some cases, this allows the page to load faster.
Of the standard attributes, you can use the charset attribute.
SCRIPT tag ( or a number of such elements) can be located either inside HEAD element, and inside the BODY element. If the script is inside the BODY element, it is also possible that some browser that does not support the SCRIPT element will perceive the program code as plain text and display it on the screen. To prevent this from happening, the script code is entered as a comment:
-
-
-
All modern browsers recognize this technique and ignore comment characters. If you need to enter a comment in the text of the script, then a different notation is used for this: two slashes // are entered at the beginning of the line.
Program code The script is executed when the page is loaded, i.e. when its contents are still visible on the screen. Below is an example of the simplest scenario ( display a message in a window).
-
-
-
- Just a script
-
- alert("You've written your first script!")
-
-
-
-
This simple page, but it includes a one-line script. Using the alert method, a message is displayed before loading. And it will hang until the user clicks on the OK button, the download will not continue.
It is possible that the page will be viewed in a browser that does not support scripting; the NOSCRIPT element is provided for this. Modern programs views ignore its contents. This element can be used in several ways. To begin with, you can display an ad inside it like the following: “ Your browser cannot execute the script required to view this web page!"Secondly, inside the element you can develop a simplified version of the page, without scripts. Third, you can create a link to another HTML document. The NOSCRIPT element must have an end tag.
So we looked at the basics of such a WEB programming language as HTML. Even after reading this short article, you already have an idea, and even the ability to program in this language. Good luck!
I decided to pay more attention to beginners who want to acquire knowledge in the field of website building. My teacher pushed me to do this, because she made a lot of mistakes in the manuals for laboratory work. I would be happy to look at the resource from which the educational information was taken, and leave a couple of lines of my opinion there. But that’s not about that now. In my first lecture I will talk about
What is the structure of an HTML document?The tag indicates that the structure of the html document begins and ends. Most of the information for the browser and search engines is stored between the tags. The tags contain the title of our page. The tag indicates that further information is intended for the user, and naturally indicates that the information for the user ends.
Now let me explain a little. All tags ( tag - hypertext markup language element) are divided into two types: “single” and “closing”. Additionally, tags are enclosed in the following characters< и >, they are what distinguish the tag from ordinary html text. Let's look at a few of the simplest “single” tags:
— a tag that is responsible for breaking to a new line in the place where this tag is installed. Let's look at the code using this tag.
My first website Hello everyone!
And this is my first site.
The result can be viewed.
— a tag that draws a horizontal line. This tag applies to block elements, the line always starts on a new line. Has 5 attributes:
- align — Determines the alignment of the line. Can take the value left, center, right.
- color — Sets the color of the line.
- noshade - Draws a line without 3D effects.
- size — Sets the line thickness.
- width — Sets the width of the line.
Code using the tag:
My first site Hello everyone! This is my first site.
A visual example can be found here.
Another “single” tag is . This tag is used to store information intended for browsers and search engines. Search engines look to meta tags to obtain site descriptions, keywords, and other data. You are allowed to use an unlimited number of meta tags, all of them must be between and . The parameters of any meta tag are of the form “name=value”, which is determined by the keywords content , name or http-equiv . Because meta tags are intended for machines, they do not make any visual changes, so I will only provide the source code:
This line indicates that the page creator believes that the page is using UTF-8 encoding. In HTML5 everything has become simpler; in order to specify the encoding, all you need is the following line:
There are other single tags (, ,
, , , , , , , , , , , , , ), but I will introduce you to them a little later.
Now let's talk about "closing" tags. The very name “closing tag” indicates that the tag requires a mandatory closing. This is done in order to clearly limit the part of the text that the tag affects.
For a clear example, let's look at the tag, which is used to highlight text; it sets the font to bold. Tags are boundaries that define the area of text selection. Here is the code where they forgot to close the tag in the last line:
My first website Hello everyone! And this is my first site.
Hi all! And this is my first site.
As you can see, there is nothing complicated, now you can create several pages linked to each other.
Tags for highlighting textThere are several ways to highlight text on a page. This can be done using styles, or you can use tags. We are (for now) interested in the second option.
— sets the font to bold.
— sets italic font style.
— adds an underline to the text.
— intended to emphasize the text. Browsers display this text in italics.
- crosses out the text. This tag has been removed from HTML5, it is recommended to use it instead
— displays text as monospaced text. Removed from HTML5.
— displays the font as a superscript. The font appears above the text baseline and at a reduced size.
— displays the font as a subscript. The text is positioned below the baseline of the remaining characters in the line and is reduced in size.
— intended to emphasize the text. Browsers display this text in bold.
— reduces the font size by one compared to regular text. In HTML, font size is measured in conventional units from 1 to 7, the average default text size is 3. The tag reduces the text by one conventional unit. Nested tags are allowed, and the font size will be smaller by 1 with each nested level, but cannot be less than 1.
— increases the font size by one compared to regular text. In HTML, font size is measured in units from 1 to 7, the average default text size is 3. Thus, adding a tag increases the text by one unit. Nested tags are allowed, and the font size will be larger with each level.
— used to highlight quotes in the text. The contents of the container are automatically displayed in the browser in quotation marks.
— designed to highlight long quotes within a document. Text marked with this tag is traditionally displayed as an aligned block with padding on the left and right (approximately 40 pixels), as well as padding at the top and bottom.
— defines a block of pre-formatted text. Such text is usually displayed in a monospaced font and with all spaces between words. By default, any number of spaces in the code in a row are shown as one on the web page. Tag Allows you to bypass this feature and display text as required by the developer.
— defines a text paragraph. TagIt is a block element, always starts on a new line, paragraphs of text following each other are separated by padding. The amount of padding can be controlled using styles. If there is no closing tag, the end of the paragraph is considered to coincide with the beginning of the next block element.
.... - HTML offers six headings at different levels, which indicate the relative importance of the section after the heading. Thus, the tag represents the most important first level heading, and the tag serves to indicate the sixth level heading and is the least important. By default, the first level heading is displayed in the largest bold font, and subsequent level headings are smaller in size. Tags ,..., refer to block elements, they always start on a new line, and after them other elements are displayed on the next line. In addition, before and after the title is added empty space. The tag has an align attribute, which determines the alignment of the title; it can take the following values: left - left-aligned title, center - centered-aligned, right - right-aligned, justify - justified (both right and left). This value only works for headers that are longer than one line.
— is a container for changing font characteristics, such as size, color and typeface. Although this tag is still supported by all browsers, it is considered obsolete and its use is recommended to be abandoned in favor of styles. The tag has 3 attributes: color — sets the text color, face — determines the font typeface, size — sets the font size in conventional units.
— marks the text as a quotation or footnote to other material. This highlighting is useful for changing the style of text via CSS, and is also used to separate HTML code into structural elements. Browsers typically set text inside a container to be italic.
— indicates that the sequence of characters is an abbreviation. By using title attribute a decoding of the abbreviation is given, which allows those people who are not familiar with it to understand the abbreviation. In addition, search engines index the full-text version of the abbreviation, which can be used to improve the ranking of the document.
By default, the text enclosed in the container is underlined with a dotted line.
Below is the code in which I used all these tags:
My first site
HTML and CSS are two of the core technologies for building Web pages. HTML provides the structure of the page, CSS the (visual and aural) layout, for a variety of devices. Along with graphics and scripting, HTML and CSS are the basis of building Web pages and Web Applications. Learn more below about:
What is HTML? HTML is the language for describing the structure of Web pages. HTML gives authors the means to: Publish online documents with headings, text, tables, lists, photos, etc.Retrieve online information via hypertext links, at the click of a button.
Design forms for conducting transactions with remote services, for use in searching for information, making reservations, ordering products, etc.
Include spread-sheets, video clips, sound clips, and other applications directly in their documents.
With HTML, authors describe the structure of pages using markup. The elements of the language label pieces of content such as “paragraph,” “list,” “table,” and so on. What is XHTML?
XHTML is a variant of HTML that uses the syntax of XML, the Extensible Markup Language. XHTML has all the same elements (for paragraphs, etc.) as the HTML variant, but the syntax is slightly different. Because XHTML is an XML application, you can use others XML tools with it (such as XSLT, a language for transforming XML content).
What is CSS?CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language. The separation of HTML from CSS makes it easier to maintain sites, share style sheets across pages, and tailor pages to different environments. This is referred to as the separation of structure (or: content) from presentation.
What is WebFonts? WebFonts is a technology that enables people to use fonts on demand over the Web without requiring installation in the operating system. W3C has experience in downloadable fonts through HTML, CSS2, and SVG. Until recently, downloadable fonts have not been common on the Web due to the lack of an interoperable font format. The WebFonts effort plans to address that through the creation of an industry-supported, open font format for the Web (called "WOFF").The lecture has come to an end, I hope the acquired knowledge will be useful to you! In the next lecture, I will tell you what the tag stores, we will learn how to perform all kinds of manipulations with images, and get acquainted with tables.
When writing this article, the description of some tags was taken from here
HTML stands for H yper T ext M arkup L anguage, i.e. Hypertext Markup Language is the basic building block of web pages, used to create and visually present web pages.
HTML adds markup to plain text. Hypertext contains various links through which web pages are connected to each other. WITH using HTML Anyone can create both static and dynamic sites. HTML is a language that describes the structure and semantics of the content of a web document. The content of a web page is marked up using tags that represent HTML elements. Examples of such elements are, , and so on. These elements form the building blocks for any website.
HTML was invented in 1991 by scientist Tim Berners-Lee, and was originally intended for the exchange of documents between scientists at different universities. With his invention, Tim Burns-Lee laid the foundations of the modern Internet.
There are several versions of HTML. The language standard is continuously updated and supplemented, as a result of which it is published almost every year a new version HTML. Version "HTML 2.0" was the first standard HTML specification, which was published in 1995. HTML 4.01 is mainstream HTML version, which was published at the end of 1999, and is widely used today. Today, the most popular version is HTML-5, which is an extension of HTML 4.01, published in 2012.
An HTML document or web page is a simple Text Document, containing tags (which in turn are plain text enclosed in angle brackets). The web page can be typed as usual text editor(Notepad, WordPad, Word, etc.), and in specialized, code highlighting (Notepad++, Sublime Text and etc.). HTML documents are stored as files with the extension .htm or .html.
Online examples in every lessonAs we present the material, each lesson will provide examples that will help you understand each code in detail and, through practice, enjoy learning. With our online HTML editor, you can edit an HTML document, and then click the orange "Run" button in the editor, which is located above the left editor window, to see the result. If you use a specialized HTML editor, then you can copy the example and view the results of your work in the browser installed on your computer.
Example HTML: Try it yourselfPage title
This is the title
This is a paragraph.
Online HTML examples
IN HTML tutorial More than 100 online examples have been prepared for you, thanks to which you can easily master the markup language. Better to see once than hear a hundred times! Theory plus practice is the key to your success in mastering HTML.