CSS Notes for Beginners (Easy + Quick Guide) π¨
π¨ CSS Notes for Beginners (Easy + Quick Guide)
Hello everyone π
Welcome back to my blog!
In this post, you will learn CSS (Cascading Style Sheets) in a very simple and easy way. These notes are perfect for beginners and BCA students who want quick revision π
π What is CSS?
CSS stands for Cascading Style Sheets.
It is used to style and design web pages written in HTML.
π CSS makes your website look beautiful and attractive.
π§© Types of CSS
1. Inline CSS
Used inside HTML tags
<h1 style="color:red;">Hello</h1>
2. Internal CSS
Used inside <style> tag
<style>
h1 { color: blue; }
</style>
3. External CSS
Used in separate file
<link rel="stylesheet" href="style.css">
⚙️ CSS Syntax
selector {
property: value;
}
Example:
p {
color: red;
font-size: 16px;
}
π¨ Colors in CSS
- color: red;
- color: #ff5733;
- color: rgb(0, 128, 255);
- color: hsl(120, 100%, 50%);
πΌ️ Background
background-color: lightblue;
background-image: url("img.jpg");
background-repeat: no-repeat;
background-size: cover;
π€ Text Styling
color: blue;
text-align: center;
font-size: 18px;
font-weight: bold;
π¦ Box Model
CSS box model includes:
- Margin (outer space)
- Border
- Padding (inner space)
- Content
π² Flexbox (Basics)
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
π― Selectors
- Element →
p {} - Class →
.class {} - ID →
#id {} - Universal →
* {}
π Units
- px (pixels)
- % (percentage)
- em (relative)
- rem (root relative)
- vw / vh (viewport)
⭐ Important Tip
Practice is the key!
The more you code, the better you become π»
π Conclusion
These were quick and easy CSS notes for beginners.
Save this post and revise daily to improve your coding skills π
π Follow for more coding notes on HTML, CSS, JavaScript, and more!
Comments
Post a Comment