Comments and Lists
Site: | ΕΛ/ΛΑΚ Moodle |
Course: | Study / Web Design and Web Development |
Book: | Comments and Lists |
Printed by: | Guest user |
Date: | Thursday, 21 November 2024, 10:43 PM |
Description
- Comments
- Unordered list
- Ordered list
- Nested list
Comments
Comments are used in HTML when we want to remind ourselves something or we want to explain to others what we did.
Comments are not visible on the page.
The comment tag starts with <!--
and ends with -->
.
Lists
In HTML there are two types of lists <ul>
and <ol
.
<ul>
stands for unordered list, which is the classical list with bullet points.
<ol>
stands for ordered list in which its items are marked with numbers.
Each item of both lists starts with <li>
tag, which stands for list item, and ends with </li>
.
By default a <ol>
will start counting from 1.
However, we are able to change the start point, reverse the counting or even use alphabetical characters.
Examples
Unordered list
- The first item
- The second item...
- The third item!
Ordered list
- The 1st item
- The 2nd item...
- The 3rd item!
- The 4th item!
This ordered list starts from 2000
- the 1st year of the 21st century
- the 2nd year of the 21st century
- the 3rd year of the 21st century
- the 4th year of the 21st century
This ordered list is reversed
- the last year of 21st century
- two years until the end of the 21st century
- three years until the end of the 21st century
- four years until the end of the 21st century
Nested list
- Coffee
- Tea
- Black tea
- Green tea
- Milk
You can find more examples of Lists on w3schools