Task list
Text markup with HTML1/10
Back to the list of tasks
  1. 1. Paragraphs
  2. 2. Headings and subheadings
  3. 3. Unordered list
  4. 4. Ordered list
  5. 5. Multilevel list
  6. 6. Description List
  7. 7. Strong and b tags
  8. 8. Em and i tags
  9. 9. Line breaks and separators
  10. 10. Preformatted text
Nest task
  • Courses
  • Sign up
  • Log in

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

  • Theory
  • Theory

Paragraphs

Earlier, you learned about the tags needed to create a simple HTML page and some of the service tags that are not displayed in the browser.

In this part we will study tags for text markup. You can use them only inside the <body> tag.

Let's start with the simple <p> tag, which is used to create paragraphs. By default, paragraphs start on a new line and are vertically indented, which can be controlled with styles.

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Paragraphs</title> <link rel="stylesheet" href="style.css"> </head> <body> <p>A paragraph is a piece of writing consisting of several sentences.</p> A paragraph is used to group homogeneous units of a statement. A paragraph is usually indented to make it stand out. That's how they are, paragraphs. </body> </html>
CSS
p { margin-top: 24px; margin-bottom: 24px; }

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

    Mark up three more paragraphs using the p tag:

    1. "A paragraph is used to group homogeneous units of a statement."
    2. "A paragraph is usually indented to make it stand out."
    3. "That's how they are, paragraphs."

    © 2023-2024, codehero.pro