HTML Academy
Let’s start the diary
Text markup2/21
Back to the list of tasks
  • 1. Let’s start the diary
  • 2. The ul tag, which is used to indicate an unordered list
  • 3. The ol tag, which is used to provide an ordered list
  • 4. The start and reversed attributes
  • 5. Nested lists
  • 6. The dl, dt and dd tags as well as description list
  • 7. The pre tag, which is used to designate preformatted text
  • 8. HTML entities
  • 9. The tag code, or code snippet
  • 10. Combining pre and code tags
  • 11. The tag q, which is used to format inline quotes
  • 12. The blockquote tag, which is used for calling out quotes
  • 13. The br tag, which is used to create a line break
  • 14. The sub and sup tags, which are used to indicate subscript and superscript
  • 15. The time tag, which is used to specify the date and time
  • 16. The em and i tags, which are used to attract the user’s attention
  • 17. The strong and b tags, which are used to strengthen or highlight text
  • 18. The del and ins tags, which are used to highlight changes
  • 19. The div and span tags, style containers
  • 20. Summary of “Text markup”
  • 21. Test: Marking up an article
The ol tag, which is used to provide an ordered list
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

The ul tag, which is used to indicate an unordered list

In the new blog entry we need to mark up the list of advantages of working as a coder. Our current arsenal of text tags is small (headings and paragraphs), and they are poorly suited for marking up lists. Is there a special tag for lists?

Yes. There are several tags in HTML for marking up lists: for ordered lists, unordered lists and lists of descriptions. Our list is unordered. After all, what difference does it make to place an item in one place as opposed to another? What is the meaning of specific placement within the list?

The unordered list is marked up using the <ul> tag (which is short for “unordered list”). It is used when the element order is not important. For example, to mark up the list of links in the menu, the benefits of the product, and the ingredients that make up the product.

Only <li> (which is short for “list item”) tags can be nested directly inside the <ul> tag, which is used to indicate list elements or list items: There may be an unlimited number of items, but there shouldn’t be less than one. Let’s give an example:

<ul>
  <li>I am a list item, and I can be positioned in any place.</li>
  <li>And I also am a list item, and the order in which I am listed is also not important</li>
</ul>

By default <ul> elements are highlighted with markers of the same color as the text color.

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>The website of a beginning coder</title> <link rel="stylesheet" href="style.css"> </head> <body> <header> <p>Blog</p> <nav> Return to home </nav> </header> <main> <article> <h1>Day Two. I want to become a coder</h1> <p>Today I spent the whole evening on the Internet. I read about the advantages of working as a coder. I often spent my free time watching cat videos, of course. But then I remembered something:</p> <!-- Begin the list here --> You are helping a useful cause You can work remotely Interesting people Good salary <p>My desire to learn has dramatically increased.</p> </article> <aside> Your ad could go here </aside> </main> <footer> Website footer </footer> </body> </html>
CSS
body { padding: 0 30px; font-size: 14px; line-height: 22px; font-family: "Georgia", serif; color: #222222; } h1 { font-size: 20px; line-height: normal; } nav { color: #888888; } aside { margin: 20px 0; color: #c4c4c4; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Add an unordered list <ul> to <article> after the first paragraph, and enclose all of the unmarked text in it.
    2. Enclose the text You are helping a useful cause in the list using the element <li>,
    3. and then you can mark up the element with the text You can work remotely.
    4. and finally add an element with the text Interesting people.
    1. Add the last element with the text Good salary to the list.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.