1 added
0 removed
Original
2026-01-01
Modified
2026-02-21
1
<h2>What is HTML?</h2>
1
<h2>What is HTML?</h2>
2
<p><em>HTML (Hypertext Markup Language)</em>is a language for marking up hypertext, it's a set of rules by which the browser distinguishes headings from lists, tables from pictures, and so on. HTML appeared in 1993 and was intended to standardize the rules for displaying text within web pages.</p>
2
<p><em>HTML (Hypertext Markup Language)</em>is a language for marking up hypertext, it's a set of rules by which the browser distinguishes headings from lists, tables from pictures, and so on. HTML appeared in 1993 and was intended to standardize the rules for displaying text within web pages.</p>
3
<p>Take a good look at the page you're on now. All of it, regardless of appearance, is written using HTML. It does a good job of showing that no matter how complicated the page is, the whole essence of it has remained the same for more than 20 years.</p>
3
<p>Take a good look at the page you're on now. All of it, regardless of appearance, is written using HTML. It does a good job of showing that no matter how complicated the page is, the whole essence of it has remained the same for more than 20 years.</p>
4
<p>The word "language" in HTML should be taken to mean<em>rule</em>. HTML by itself only<em>marks up</em>the data; it doesn't interact with it in any way and does nothing with it visually. All the work of displaying text data and markup is done by the browser.</p>
4
<p>The word "language" in HTML should be taken to mean<em>rule</em>. HTML by itself only<em>marks up</em>the data; it doesn't interact with it in any way and does nothing with it visually. All the work of displaying text data and markup is done by the browser.</p>
5
<p>You can try to open the markup of this page using Ctrl + U (Cmd + Option + U on macOS).</p>
5
<p>You can try to open the markup of this page using Ctrl + U (Cmd + Option + U on macOS).</p>
6
<p>Don't be intimidated by all the stuff you can see there. In time, this will stop looking like gibberish, and you'll easily navigate HTML markup.</p>
6
<p>Don't be intimidated by all the stuff you can see there. In time, this will stop looking like gibberish, and you'll easily navigate HTML markup.</p>
7
<p>Let's take a look at a small example of HTML:</p>
7
<p>Let's take a look at a small example of HTML:</p>
8
<p>Right now, it may seem unclear what section, h1, and p mean. But now the most important thing is that behind all these constructions is the text content.</p>
8
<p>Right now, it may seem unclear what section, h1, and p mean. But now the most important thing is that behind all these constructions is the text content.</p>
9
<p>Always put content before visual appearance. The courses will give you many different block styling techniques, but don't get carried away. If the text on the page is hard to read, the page will have almost no value.</p>
9
<p>Always put content before visual appearance. The courses will give you many different block styling techniques, but don't get carried away. If the text on the page is hard to read, the page will have almost no value.</p>
10
+
<h2>Tags in HTML</h2>
10
<p>But what did the mysterious section, h1, and p mean? In markup language, they're called tags. It's the tags that wrap our content and ultimately get processed by browsers.</p>
11
<p>But what did the mysterious section, h1, and p mean? In markup language, they're called tags. It's the tags that wrap our content and ultimately get processed by browsers.</p>
11
<p>One of the tags it's important to learn about is a paragraph. Paragraph, like paragraphs in real life, allows you to separate sections of text by meaning. Visually, this is usually done using indentation. There are many paragraphs on this page, and you can easily distinguish them from each other by the spacing between them.</p>
12
<p>One of the tags it's important to learn about is a paragraph. Paragraph, like paragraphs in real life, allows you to separate sections of text by meaning. Visually, this is usually done using indentation. There are many paragraphs on this page, and you can easily distinguish them from each other by the spacing between them.</p>
12
<p>In order to insert a paragraph into a page, you need to specify a special construction, <p> and </p>, with a paragraph of text between them.</p>
13
<p>In order to insert a paragraph into a page, you need to specify a special construction, <p> and </p>, with a paragraph of text between them.</p>
13
<p>As you'll have noticed, we may have more than one paragraph. Almost all<em>HTML tags</em>can be used multiple times on one page.</p>
14
<p>As you'll have noticed, we may have more than one paragraph. Almost all<em>HTML tags</em>can be used multiple times on one page.</p>
14
<p>The paragraph tag has an opening <p> and a closing </p>. It is because of this that the browser understands where the paragraph begins and where it ends. These tags are called<em>paired</em>tags.</p>
15
<p>The paragraph tag has an opening <p> and a closing </p>. It is because of this that the browser understands where the paragraph begins and where it ends. These tags are called<em>paired</em>tags.</p>
15
<p>You may imagine that if there are paired tags, then there'll also be<em>unpaired</em>tags. And you're not wrong! In the process of working with layout design, you'll learn about these tags and how they're used Take your time :)</p>
16
<p>You may imagine that if there are paired tags, then there'll also be<em>unpaired</em>tags. And you're not wrong! In the process of working with layout design, you'll learn about these tags and how they're used Take your time :)</p>
16
<p>Another key concept that goes alongside tags is<em>nesting</em>. Look again at the example markup:</p>
17
<p>Another key concept that goes alongside tags is<em>nesting</em>. Look again at the example markup:</p>
17
<p>In this example, we have a<em>paired section tag</em>, and inside it there are other tags and text inside them. This concept is an important one that allows you to build large systems.</p>
18
<p>In this example, we have a<em>paired section tag</em>, and inside it there are other tags and text inside them. This concept is an important one that allows you to build large systems.</p>
18
<p>Sometimes, nesting is a necessary part of text markup. For example, lists cannot be made without using nesting.</p>
19
<p>Sometimes, nesting is a necessary part of text markup. For example, lists cannot be made without using nesting.</p>
19
<p>The browser will output this HTML markup as follows:</p>
20
<p>The browser will output this HTML markup as follows:</p>
20
<ul><li>The first list item</li>
21
<ul><li>The first list item</li>
21
<li>The second list item</li>
22
<li>The second list item</li>
22
</ul><p>Without<em>li</em>tags, the browser cannot distinguish between plain text and list items.</p>
23
</ul><p>Without<em>li</em>tags, the browser cannot distinguish between plain text and list items.</p>
23
<h2>Attributes</h2>
24
<h2>Attributes</h2>
24
<p>Another important concept in HTML is attributes and what they mean. Attributes are just additional information for the browser.</p>
25
<p>Another important concept in HTML is attributes and what they mean. Attributes are just additional information for the browser.</p>
25
<p>In HTML, you can use links to navigate the web. It's not enough to just provide a link tag (<a></a>) and the text inside.</p>
26
<p>In HTML, you can use links to navigate the web. It's not enough to just provide a link tag (<a></a>) and the text inside.</p>
26
<p>Browsers, unfortunately, can't read our thoughts and redirect the user where we want :(</p>
27
<p>Browsers, unfortunately, can't read our thoughts and redirect the user where we want :(</p>
27
<p>To redirect the user, we have to help the browser and tell it where the user will go after clicking on the link. This requires the<em>href</em>attribute, the value of which is the desired link.</p>
28
<p>To redirect the user, we have to help the browser and tell it where the user will go after clicking on the link. This requires the<em>href</em>attribute, the value of which is the desired link.</p>
28
<p>Now, when the user clicks on the link, they'll be successfully redirected to the address we specified inside the href attribute.</p>
29
<p>Now, when the user clicks on the link, they'll be successfully redirected to the address we specified inside the href attribute.</p>
29
<h2>General HTML tag format</h2>
30
<h2>General HTML tag format</h2>
30
<h2>Do it yourself</h2>
31
<h2>Do it yourself</h2>
31
<p>Use any online service that can convert HTML markup. For example,<a>https://htmlcodeeditor.com/</a>.</p>
32
<p>Use any online service that can convert HTML markup. For example,<a>https://htmlcodeeditor.com/</a>.</p>
32
<p>Insert the following markup in the left part:</p>
33
<p>Insert the following markup in the left part:</p>
33
<p>Look at the final result. Try deleting different tags and changing them. Experiment, it won't bite :)</p>
34
<p>Look at the final result. Try deleting different tags and changing them. Experiment, it won't bite :)</p>