See More

\n Code Basics - free hands-on programming lessons for people\n starting from scratch.\n <\/p>\n

\n If you are a complete beginner and want to learn the basics - variables,\n strings, loops, functions, etc., then Code Basics is for you.\n <\/p>\n<\/section>\n```\n\nDon't be intimidated by all the confusing words and symbols - by the end of the course, you'll understand how the markup above works, and you'll learn how to use this markup on your own pages. Note that the whole essence of the markup above is text. The rest are auxiliary elements to display the text where it was conceived to be by the designers and\/or developers.\n","version_id":78704,"description":null,"definitions":[],"tips":[],"created_at":"2026-09-22T19:50:25.694Z","prepared_code":"","original_code":"

Hello, World!<\/h1>\n","test_code":"const { test } = require('tests');\n\ntest(({ query, expect }) => {\n const element = query(document, 'h1', HTMLHeadingElement);\n expect(element).to.have.text('Hello, World!');\n});\n","version":78704,"slug":"html-markup","natural_order":1,"source_code_url":"https:\/\/github.com\/hexlet-basics\/exercises-html\/blob\/main\/modules\/10-html\/10-html-markup\/en\/README.md"},"nextLesson":null,"courseModules":[{"locale":"en","description":"To normalize text rendering in a browser was developed HTML markup language that describes the rules for the layout of text data. Despite the long evolution of the language, its basic concepts haven't changed even after more than 20 years. In first module, we will review the fundamental concepts of HTML: tag, attribute, and nesting of tags, and will learn the core features of marking up text with paragraphs.\n","name":"HTML Basics","id":39},{"locale":"en","description":"HTML provides dozens of rules for working with text, from creating blocks of text, to complex tables and nested lists. Marking up text properly is a core skill when building a web site.\n","name":"Text in HTML","id":40},{"locale":"en","description":"HTML markup allows you to add images to pages, and the latest HTML5 standard has added the ability to work with audio and video content\n","name":"Media elements","id":41},{"locale":"en","description":"Each HTML page consists of several common blocks that describe a data set: meta tags, page title, content. The HTML standard has its own blocks and constructions for each part.\n","name":"HTML document structure","id":42},{"locale":"en","description":"Form is one of the most important HTML elements. It allow the user to interact with the site, and engage him. Search, feedback, questionnaires are all created using forms.\n","name":"Forms","id":55},{"locale":"en","description":"HTML5 introduced plenty of new tags for semantic markup. They are designed to help browsers process your document more accurately, using \"reader mode\". Search engines will also appreciate you helping them clearly see the structure of your website. In this module, we'll mark up a generic web page using the new HTML5 tags\n","name":"Semantic elements HTML5","id":43},{"locale":"en","description":"When talking about HTML, one cannot skip topics related to the Internet ecosystem as a whole. Markup, semantics, and validation provide important insights when working with HTML documents.\n","name":"Other","id":44}],"lessonsByModuleId":{"39":[{"language":{"id":6,"slug":"html","learn_as":"first_language","progress":"completed","category_id":null,"current_version_id":2324,"created_at":"2019-06-24T14:40:48.000Z","current_version":{"id":2324,"result":"Success","state":"built","created_at":"2026-09-22T19:50:21.277Z"},"hexlet_program_landing_page":"https:\/\/ru.hexlet.io\/programs\/frontend","repository_url":"https:\/\/github.com\/hexlet-basics\/exercises-html","cover_list_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsMzAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--7f5cb77d08a2f7f20c947e4471d5f47a7459f0f4\/html.png","cover_thumb_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MCwzMF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--110c303af978616d1b24fded57b4009ff798aff6\/html.png","rating_count":89,"members_count":110642,"rating_value":4},"id":258,"name":"The basics of HTML","locale":"en","instructions":"Copy the HTML and paste it into the editor on this page\n\n```html\n

Hello, World!<\/h1>\n```\n","theory":"\nEvery day we look at dozens of web pages and read texts on them that are rendered as though they were in a magazine. These pages are hypertext - a system of web pages that can be navigated using links. A language, HTML, exists to implement this system.\n\nHTML stands for HyperText Markup Language. By its function, HTML is 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.\n\nEven this page is text marked up using HTML and processed by the browser. Technology has come a long way, but the concept of using HTML to mark up text has remained unchanged for many years.\n\nHere is an example of HTML markup:\n\n```html\n
\n

Code Basics<\/h2>\n

\n Code Basics - free hands-on programming lessons for people\n starting from scratch.\n <\/p>\n

\n If you are a complete beginner and want to learn the basics - variables,\n strings, loops, functions, etc., then Code Basics is for you.\n <\/p>\n<\/section>\n```\n\nDon't be intimidated by all the confusing words and symbols - by the end of the course, you'll understand how the markup above works, and you'll learn how to use this markup on your own pages. Note that the whole essence of the markup above is text. The rest are auxiliary elements to display the text where it was conceived to be by the designers and\/or developers.\n","version_id":78704,"description":null,"definitions":[],"tips":[],"created_at":"2026-09-22T19:50:25.694Z","prepared_code":"","original_code":"

Hello, World!<\/h1>\n","test_code":"const { test } = require('tests');\n\ntest(({ query, expect }) => {\n const element = query(document, 'h1', HTMLHeadingElement);\n expect(element).to.have.text('Hello, World!');\n});\n","version":78704,"slug":"html-markup","natural_order":1,"source_code_url":"https:\/\/github.com\/hexlet-basics\/exercises-html\/blob\/main\/modules\/10-html\/10-html-markup\/en\/README.md"},{"language":{"id":6,"slug":"html","learn_as":"first_language","progress":"completed","category_id":null,"current_version_id":2324,"created_at":"2019-06-24T14:40:48.000Z","current_version":{"id":2324,"result":"Success","state":"built","created_at":"2026-09-22T19:50:21.277Z"},"hexlet_program_landing_page":"https:\/\/ru.hexlet.io\/programs\/frontend","repository_url":"https:\/\/github.com\/hexlet-basics\/exercises-html","cover_list_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsMzAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--7f5cb77d08a2f7f20c947e4471d5f47a7459f0f4\/html.png","cover_thumb_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MCwzMF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--110c303af978616d1b24fded57b4009ff798aff6\/html.png","rating_count":89,"members_count":110642,"rating_value":4},"id":259,"name":"Tags","locale":"en","instructions":"Wrap the phrase _The quick brown fox jumps over the lazy dog_ `

` into the

tag and paste in the editor.\n","theory":"\nIn order for the browser to determine the type of element that needs to be displayed on the page, there are special constructions in HTML, called tags. You can use tags to create a paragraph, a title, or a text section, and also to quickly change them.\n\nOne of the main tags is the paragraph tag. It separates sections of text from each other, allowing users to read the information on the page more comfortably.\n\nIn HTML, paragraphs are specified using the dedicated `

<\/p>` construction, and you can put the desired text between the tags. This is done between `

` and `<\/p>`. These tags are called _paired_ tags because they have an opening and closing part. In addition to _paired_ tags, there are _unpaired_ tags, that have no closing part, because nothing fits inside.\n\n```html\n

\n Hexlet is a hands-on programming course.\n We help newcomers become professional programmers,\n and experienced developers gain new knowledge and grow professionally.\n<\/p>\n```\n\nThere can be several such paragraphs on a page - this is not a unique element.\n\n```html\n

Hexlet is a hands-on programming course.<\/p>\n

\n We help newcomers become professional programmers,\n and experienced developers gain new knowledge and grow professionally.\n<\/p>\n```\n\nJumping forward a little, we'd like to point out that browsers, by default, display many tags with predefined styles. For example, paragraphs are indented at the bottom to visually separate them from each other. The last example in the browser looks like this:\n\n![](\/rails\/active_storage\/blobs\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6MjExMCwicHVyIjoiYmxvYl9pZCJ9fQ==--f4565849cf11170425e22123aab5ebd382175f00\/result.png)\n\nUsing CSS, you can change these styles and add new ones. There is a separate course on this site for learning this language.\n","version_id":78705,"description":null,"definitions":[],"tips":[],"created_at":"2026-09-22T19:50:25.852Z","prepared_code":"","original_code":"

The quick brown fox jumps over the lazy dog<\/p>\n","test_code":"const { test } = require('tests');\n\ntest(({ query, expect }) => {\n const element = query(document, 'p', HTMLParagraphElement);\n expect(element).to.contain.text('lazy');\n});\n","version":78705,"slug":"tags","natural_order":2,"source_code_url":"https:\/\/github.com\/hexlet-basics\/exercises-html\/blob\/main\/modules\/10-html\/20-tags\/en\/README.md"},{"language":{"id":6,"slug":"html","learn_as":"first_language","progress":"completed","category_id":null,"current_version_id":2324,"created_at":"2019-06-24T14:40:48.000Z","current_version":{"id":2324,"result":"Success","state":"built","created_at":"2026-09-22T19:50:21.277Z"},"hexlet_program_landing_page":"https:\/\/ru.hexlet.io\/programs\/frontend","repository_url":"https:\/\/github.com\/hexlet-basics\/exercises-html","cover_list_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsMzAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--7f5cb77d08a2f7f20c947e4471d5f47a7459f0f4\/html.png","cover_thumb_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MCwzMF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--110c303af978616d1b24fded57b4009ff798aff6\/html.png","rating_count":89,"members_count":110642,"rating_value":4},"id":261,"name":"Text in HTML","locale":"en","instructions":"Format this text\n\n```html\nMy Circle, a career portal, studied the IT education market and determined which online schools teach programming well. In the final ranking, Hexlet came in second place.<\/p>\n\n\"My Circle\" surveyed 3,500 IT professionals and compiled a ranking table of online schools for programmers. \"My Circle\" and \"Habr\" users who attended online universities took part in the survey. In the final table, Hexlet came in second place.\n```\n\nEach paragraph must be inside a separate tag\n","theory":"\nWithin a browser or other program that can process HTML, the text is rendered based on the specified tags. Without them, the browser will not understand how to properly display the text.\n\nLet's look at an example of text and try to output it both with tags and without them.\n\nText:\n\n```html\nWe believe that a true programmer must understand how a computer works and be able to think like a computer. They should see a problem, not an assignment. They must be able to analyze and reason at the level of the problem and above, not just at a code level.\n\nWith today's abundance of study materials, courses, and books, the main question a beginner faces now is not \"where to study?\" but \"what should I study and in what order?\". There are many opinions on this subject. Some advise starting with mathematics, while others advise specific languages and technologies.\n```\n\nIf you insert this text into the page without using tags, you'll get this result:\n\n```html\nWe believe that a true programmer must understand how a computer works and be able to think like a computer. They should see a problem, not an assignment. They must be able to analyze and reason at the level of the problem and above, not just at a code level. With today's abundance of study materials, courses, and books, the main question a beginner faces now is not \"where to study?\" but \"what should I study and in what order?\". There are many opinions on this subject. Some advise starting with mathematics, while others advise specific languages and technologies. Hexlet is a ready-made path from absolute beginner to your first job.\n```\n\nThis is not the result that was expected - the lines have been stuck together and turned into one unreadable wall of text. For the text to look as intended, it needs to be wrapped in `

` tags:\n\n```html\n

We believe that a true programmer must understand how a computer works and be able to think like a computer. They should see a problem, not an assignment. They must be able to analyze and reason at the level of the problem and above, not just at a code level.<\/p>\n\n

With today's abundance of study materials, courses, and books, the main question a beginner faces now is not \"where to study?\" but \"what should I study and in what order?\". There are many opinions on this subject. Some advise starting with mathematics, while others advise specific languages and technologies.<\/p>\n\n

Hexlet is a ready-made path from absolute beginner to your first job.<\/p>\n```\n\n

\n

We believe that a true programmer must understand how a computer works and be able to think like a computer. They should see a problem, not an assignment. They must be able to analyze and reason at the level of the problem and above, not just at a code level.<\/p>\n\n

With today's abundance of study materials, courses, and books, the main question a beginner faces now is not \"where to study?\" but \"what should I study and in what order?\". There are many opinions on this subject. Some advise starting with mathematics, while others advise specific languages and technologies.<\/p>\n\n

Hexlet is a ready-made path from absolute beginner to your first job.<\/p>\n<\/div>\n\nThe example illustrates that text formatted in a word processor and then opened in a browser will be one continuous line, so the information needs to be marked with special tags. In this course, we'll look at tags for creating tables, lists, links, and page sections that make sense. In this lesson, we took a closer look at paragraphs and the importance of markup for proper output on a page.\n","version_id":78706,"description":null,"definitions":[],"tips":[],"created_at":"2026-09-22T19:50:26.932Z","prepared_code":"","original_code":"

My Circle, a career portal, studied the IT education market and determined which online schools teach programming well. In the final ranking, Hexlet came in second place.<\/p>\n\n

\"My Circle\" surveyed 3,500 IT professionals and compiled a ranking table of online schools for programmers. \"My Circle\" and \"Habr\" users who attended online universities took part in the survey. In the final table, Hexlet came in second place.<\/p>\n","test_code":"const { test } = require('tests');\n\ntest(({ query, querySelectorAll, expect }) => {\n query(document, 'p', HTMLParagraphElement);\n const elements = querySelectorAll(document, 'p', HTMLParagraphElement);\n expect(elements).to.have.length(2)\n \/\/ expect(elements).to.contain.text(['surveyed', 'studied'])\n});\n","version":78706,"slug":"text-in-html","natural_order":3,"source_code_url":"https:\/\/github.com\/hexlet-basics\/exercises-html\/blob\/main\/modules\/10-html\/30-text-in-html\/en\/README.md"},{"language":{"id":6,"slug":"html","learn_as":"first_language","progress":"completed","category_id":null,"current_version_id":2324,"created_at":"2019-06-24T14:40:48.000Z","current_version":{"id":2324,"result":"Success","state":"built","created_at":"2026-09-22T19:50:21.277Z"},"hexlet_program_landing_page":"https:\/\/ru.hexlet.io\/programs\/frontend","repository_url":"https:\/\/github.com\/hexlet-basics\/exercises-html","cover_list_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsMzAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--7f5cb77d08a2f7f20c947e4471d5f47a7459f0f4\/html.png","cover_thumb_variant":"https:\/\/code-basics.com\/rails\/active_storage\/representations\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6NjA2LCJwdXIiOiJibG9iX2lkIn19--f788557d06a394106a789e8a67949a8165def32b\/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MCwzMF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--110c303af978616d1b24fded57b4009ff798aff6\/html.png","rating_count":89,"members_count":110642,"rating_value":4},"id":262,"name":"Tag nesting","locale":"en","instructions":"Create a bullet list of three items. You learned about this type of list in this lesson\n","theory":"\nTag nesting is an important concept in HTML. You can place more than just text between HTML tags as it was before, you can also place other tags. This allows you to create a complex layout in which areas are separated from each other, e.g., the menu is separated from the header, the advertising block is separated from the main content, etc.\n\nSome elements in HTML require some tags to be nested into other. For example, lists:\n\n![](\/rails\/active_storage\/blobs\/proxy\/eyJfcmFpbHMiOnsiZGF0YSI6MjExNCwicHVyIjoiYmxvYl9pZCJ9fQ==--903c6f16cf39100f23cef2b73acea3ee0487a0c2\/list.png)\n\n```html\n