Unordered Lists (<ul>)
Use an unordered list when you need to group a collection of items that do not require a numerical order and where the specific sequence of the items is meaningless.
list-style-type property.
disc, circle, and square.type attribute for this, it is now deprecated in favor of CSS.<ol>): Use for sequences where the order matters, such as recipe steps, turn-by-turn directions, or ingredients listed by decreasing proportion.<ul>): Use for simple collections, such as a shopping list, where items can be rearranged without changing the meaning.Customizing Ordered Lists You can customize markers using these attributes:
| Method | Description |
|---|---|
The type Attribute |
Sets the numbering type (e.g., 1 for numbers, a for letters, I for Roman numerals). |
The start Attribute |
Specifies the integer to start counting from (e.g., start="4" to begin with “d” or “iv”). |
The Box Model Concept In CSS, every HTML element is treated as a distinct box. Understanding how its components interact is essential for building layouts.
Four Parts of the Box Model
Data Types in Arrays Arrays are “list-like objects” that store multiple values. You can store any data type (strings, numbers, booleans, objects, etc.) and even mix different types within the same array.
The people Array Analysis
const people = [['pete', 32, 'librarian', null], ['Smith', 40, 'accountant', 'fishing:hiking:rock_climbing'], ['bill', null, 'artist', null]];
array[outer_index][inner_index].
people[0][0]people[1][2]| Variable | Outer Index | Inner Index | Result |
|---|---|---|---|
people |
[0] |
[1] |
32 |
people |
[1] |
[0] |
'Smith' |
people |
[2] |
[3] |
null |
+= (Addition): x = x + y-= (Subtraction): x = x - y*= (Multiplication): x = x * y/= (Division): x = x / y%= (Remainder): x = x % ylet a = 10;, let b = 'dog';, and let c = false;:
(a + c) + b'10dog'false to 0 during addition, so 10 + 0 = 10. Then, it concatenates the number 10 with the string 'dog'.