My cool website!
Module 1
There are three ways to introduce CSS. Inline, internal, and external.
-
Inline uses the style attribute of HTML, which applies to the individual tag.
-
The style tag goes in the head of the document and applies to the entire document.
-
External uses a link tag to connect a .css file to the HTML file.
There are many different way to use measurements in webpages, here are a few.
-
mm "Refers to millimeter, it is used to specify the measurements in millimeters."
-
cm "Refers to centimeter, it is used to specify the measurements in centimeters."
-
Q "Refers to Quarter-millimeters, it is used to specify the measurements in centimeters."
-
in "Refers to inches, it is used to specify the measurement in inches."
-
pt "Refers to point, it is used to specify the measurements in points."
-
pc "Refers to picas, it is used to specify the measurement in picas."
-
px "Refers to pixels, it is used to specify the measurement in pixels."
Selectors in CSS refer to what type of object is being modified. For example if the selector is h2, then the following CSS properties will affect the h2 tag.
Properties in CSS refer to the specific things being changed about an object. Such as font size or background color.
Values are the numbers used for properties. An example being, if we are changing the font-size, our property would be 16px or something similar.
Module 2
Module 2
CSS offers several methods to apply colors to your web elements. You can use:
- Named Colors: Predefined color names (e.g., red, blue).
- HEX Codes: A six-digit code preceded by a hash (e.g., #3498db).
- RGB/RGBA: Specify colors using the red, green, and blue components, with rgba() allowing for transparency via the fourth parameter.
The CSS box model is essential for designing and laying out web pages. It consists of:
- Content: The actual content (text, image, etc.) of the box.
- Padding: The space between the content and the border.
- Border: The edge that surrounds the padding and content.
- Margin: The space outside the border, separating the box from other elements.