Web ገጽ ቀለም እናሳምር! 🎨
Let's make our web page beautiful with CSS!
CSS ማለት Cascading Style Sheets ማለት ነው። HTML page ቀለም፣ ቅርጽ፣ መጠን እና አቀማመጥ ለማሳመር የምንጠቀምበት ነው።
English: CSS = Cascading Style Sheets. It controls how HTML elements look — colors, fonts, sizes, spacing, and layout. Without CSS, websites would look plain and boring.
🏠 ክፍል 1 ተምረናል: HTML = ቤቱ አጥንት
🎨 አሁን: CSS = ቤቱ ቀለምና ማስዋብ (paint & decoration)
Remember: HTML is the structure, CSS is the style. They work together!
CSS 3 ክፍሎች አሉት: Selector, Property, Value
CSS has 3 parts: Selector (what to style), Property (what aspect), Value (how)
/* ቅርጽ: selector { property: value; } */ h1 { color: red; /* ቀለም */ font-size: 32px; /* የ text መጠን */ text-align: center; /* መሃል አድርግ */ } p { color: blue; font-size: 18px; line-height: 1.6; /* የ line ርቀት */ }
h1, p, div — የትኛው HTML element ማስተካከል እንደምንፈልግ። Which HTML element to style.
color, font-size — ምን ማስተካከል እንደምፈልግ። What aspect to change.
red, 32px — እሴቱ ምን ይሁን። The specific value to apply.
CSS ለ HTML 3 መንገዶች አሉ:
There are 3 ways to add CSS to HTML:
<!-- HTML tag ውስጥ style attribute ይጨምሩ --> <h1 style="color: red; font-size: 30px;"> ሰላም! </h1>
<head> <style> h1 { color: blue; text-align: center; } body { background-color: #f0f0f0; } </style> </head>
<!-- index.html ውስጥ style.css link አድርጉ --> <head> <link rel="stylesheet" href="style.css"> </head> /* style.css ፋይል ለብቻ */ h1 { color: green; }
ከታች ያሉትን ቁልፎች ጫን — ቀለሙ ሲቀይር ይመልከት! 👇
Click buttons below to see CSS in action!
ሰላም Ethiopia! 🇪🇹 Hello World!
<!DOCTYPE html> <html> <head> <title>የ CSS ምሳሌ</title> <style> body { background-color: #1a1a2e; color: white; font-family: Arial; text-align: center; padding: 40px; } h1 { color: #ff6b9d; font-size: 48px; } p { font-size: 20px; color: #94a3b8; } button { background-color: #ff6b9d; color: white; padding: 12px 28px; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; } </style> </head> <body> <h1>ሰላም ኢትዮጵያ! 🇪🇹</h1> <p>CSS ተምሬ Page አሰምሬ!</p> <button>ጠቅ አድርግ!</button> </body> </html>