5. CSS (1)
5. CSS (1)
Muhammad Taufiq
Aisyah Binti Mohd. Hanifiah
Siti Nurul Akmal Binti Mohd
Nur Hidayu Binti ‘Aris
2
CSS Lists
• Lists are fundamental in organizing and displaying items on a
webpage.
• Used for navigation menus, content lists, to-do lists, and more.
• Enhances readability and structure of web content.
3
Ordered Lists
• For ordered lists, user can specify the type of numbers or letters
they would like to use.
• Ordered list can also be use as markers. For instance, roman
numbers (e.g. i, ii, iii).
• Example:
- decimal (this is the default),
- decimal-leading-zero (number with a leading zero, e.g. 01,
02..),
- lower-alpha (e.g. a, b, c..),
- lower-greek (e.g. α, β, γ..),
- upper-alpha (e.g. A, B, C..)
- upper-roman (e.g. I, II, III…).
4
Unordered List
• For unordered list, user can specify the shape that they want to use as the bullet.
6
CSS Box Model
7
CSS Box Model
Content
• The content area is where the actual content of the element is displayed. This
includes text, images, etc.
• The height and width properties help to modify the box dimensions.
Padding
• The padding area is the space around the content area and within the border-
box. It can be applied to all sides of the box or to the specific, selected side(s) -
top, right, bottom, and/or left.
8
CSS Box Model
Border
• The border area surrounds the padding and the content, and can be
applied to all the sides of the box or to selected side(s) - top, right, bottom,
and/or left.
Margin
• The margin area consists of space between the border and the margin. The
margin does not possess its own background color and is completely
transparent. It shows the background color of the element, like the body
element.
• Try on websites
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The
_box_model#what_is_the_css_box_model\ 9
CSS Layout
Flexbox - A layout model that allows responsive elements within
a container to be automatically arranged depending upon
screen size.
Example https://www.w3schools.com/csS/css3_flexbox.asp
12
CSS Float
Float is use as a CSS positioning property.
• Float is a technique that allows the elements to float to the left
or right of one another, rather than the default of sitting on top of
one another.
• The main uses of floats are to lay out columns and float text
around an image.
13
CSS Float
The float property can take several values:
-left: The element floats to the left of its container.
- right: The element floats to the right of its container.
- none: The element does not float and is displayed where it
occurs in the text
(default).
- inherit: The element inherits the float value from its parent.
Example https://developer.mozilla.org/en-US/docs/Web/CSS/float
14
Thank You