Previous task
Introduction to HTML and CSS4/13
Back to the list of tasks
  1. 1. Let's Go!
  2. 2. CSS in action
  3. 3. Consolidation
  4. 4. HTML basics
  5. 5. Single HTML tags
  6. 6. Attributes of HTML tags
  7. 7. Looking for errors in HTML
  8. 8. Basics of CSS
  9. 9. Other ways to connect CSS
  10. 10. CSS selectors
  11. 11. CSS classes
  12. 12. CSS properties and values
  13. 13. Looking for errors in CSS
Nest task
  • Courses
  • Sign up
  • Log in

Loading...
It will be ready in a few seconds.

  • Theory
  • Theory

HTML basics

The HTML language consists of tags. Tags are the building blocks of every web page.

Each tag starts with a < character and ends with a > character, for example: <p>.

All tags can be divided into paired and single tags. Each paired tag consists of two parts: an opening tag and a closing tag. The / symbol is used inside the closing tag.

Here's an example of a paired tag:

<p>Paragraph</p>

As you can see, the <p> tag has a pair in the form of a closing </p> tag.

Tags can be nested within each other. For example, a word can be highlighted in a paragraph:

<p>A paragraph in which <em>one</em> word is highlighted.</p>
  • index.html
  • style.css
HTML
<!DOCTYPE html> <html> <head> <title>HTML basics</title> <link rel="stylesheet" href="style.css"> </head> <body> Types of tags Each HTML tag has its own meaning and purpose. Some tags are service tags and are never visible on the page. Other tags are used for text formatting and their influence is quite noticeable. </body> </html>
CSS
/* This is how you can specify the font for the entire document */ body { font-family: "Georgia", serif; }

The code has changed, click "Update" or enable autorun.

You have moved to another page

Click inside the mini-browser to highlight this window.

100%
GoalsCompleted
0

    Practice using paired tags. Use them to mark up unformatted text in the editor and watch the changes in the browser.

    1. Wrap into h1 tag heading Types of tags.
    2. Wrap into a separate p tag each sentence after the title.
    3. Wrap one word into a em tag.

    © 2023-2024, codehero.pro