Skip to content

Beginner-friendly CSS notes with simple English&Turkish ✨ ----- Basit İngilizce&Türkçe başlangıç ​​seviyesindeki CSS notları✨

Notifications You must be signed in to change notification settings

ebrar-M/css-beginner-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Stars Forks Last Commit CSS

---

🌍 Languages


🇹🇷 TR Türkçe

🎨 CSS Temelleri - Yeni Başlayanlar İçin Notlar

1. 📖 CSS Nedir?

  • CSS (Cascading Style Sheets) → HTML yapısına stil ve tasarım ekler.
  • HTML = iskelet 🦴, CSS = giydirme 🎨.
  • Web sayfasının renk, yazı tipi, düzen, boyut gibi görsel yönlerini kontrol eder.

2. 🏗️ CSS Nasıl Eklenir?

CSS 3 farklı şekilde eklenebilir:

1. Inline (Etiket içine yazılır) 🚫 Tavsiye edilmez

<p style="color: red;">Bu kırmızı yazı</p>

2. Internal (HTML dosyasının <head> kısmında)

<head>
  <style>
    p { color: blue; }
  </style>
</head>

3. External (Ayrı .css dosyası bağlamak ✅ En iyi yöntem)

<head>
  <link rel="stylesheet" href="style.css">
</head>

3. 🔑 Temel CSS Seçiciler

/* Etiket seçici */
p {
  color: green;
}

/* Class seçici */
.uyari {
  color: red;
  font-weight: bold;
}

/* ID seçici */
#baslik {
  font-size: 24px;
  text-align: center;
}

4. 🎯 Yazı, Renk ve Arka Plan

body {
  background-color: #f0f0f0; /* Açık gri */
}

h1 {
  color: darkblue;
  font-family: Arial, sans-serif;
}

p {
  color: #333;
  line-height: 1.5;
}

5. 📏 Box Model (Kutuların Temeli)

Her HTML elemanı görünmez bir kutudur:

  • content (içerik)
  • padding (iç boşluk)
  • border (kenarlık)
  • margin (dış boşluk)
.kutu {
  width: 200px;
  padding: 20px;
  border: 2px solid black;
  margin: 15px;
}

6. 📐 Konumlandırma

Display

.block { display: block; }   /* Yeni satır kaplar */
.inline { display: inline; } /* Satır içinde devam eder */
.flex { display: flex; }     /* Esnek düzen */

Position

.kutu1 { position: static; }   /* Varsayılan */
.kutu2 { position: relative; top: 10px; left: 10px; }
.kutu3 { position: absolute; top: 0; right: 0; }
.kutu4 { position: fixed; bottom: 0; left: 0; }

7. 🌈 İpuçları & Sık Yapılan Hatalar

✔️ Dış CSS dosyası kullan, inline’dan kaçın.
✔️ Renkleri hex (#ff0000) veya rgb (rgb(255,0,0)) ile tanımla.
✔️ Class kullan → Tekrarlayan stillerde işini kolaylaştırır.
❌ ID ile stil vermek → Çok katı olur, esnekliğini kaybedersin.
❌ Fazla !important → Kodunu karmaşık hale getirir.


8. 🎯 Mini Alıştırmalar

  1. Bir kutu oluştur (div), 200px genişlik, kırmızı arka plan ver.
  2. Bir yazıyı ortala ve mavi renkte yap.
  3. Üç kutuyu yan yana dizmek için flexbox kullan.

📌 Son Söz

CSS, web sayfana hayat verir ✨.
HTML sadece “ne var?” derken, CSS “nasıl görünecek?” sorusunu cevaplar.
Flexbox, Grid gibi modern CSS özellikleri sayesinde çok daha kolay düzen kurabilirsin. 🚀


🇬🇧 GB English

🎨 CSS Basics - Notes for Beginners

1. 📖 What is CSS?

  • CSS (Cascading Style Sheets) → Adds style and design to the HTML structure.
  • HTML = skeleton 🦴, CSS = dressing 🎨.
  • Controls visual aspects of a web page such as color, font, layout, and size.

2. 🏗️ How to Add CSS?

CSS can be added in 3 different ways:

1. Inline (Written within a tag) 🚫 Not recommended

<p style="color: red;">This red text</p>

2. Internal (In the <head> section of the HTML file)

<head>
<style>
p { color: blue; }
</style>
</head>

3. External (Linking a separate .css file ✅ Best practice)

<head>
<link rel="stylesheet" href="style.css">
</head>

3. 🔑 Basic CSS Selectors

/* Tag selector */
p {
color: green;
}

/* Class selector */
.warning {
color: red;
font-weight: bold;
}

/* ID selector */
#title {
font-size: 24px;
text-align: center;
}

4. 🎯 Text, Color, and Background

body {
background-color: #f0f0f0; /* Light gray */
}

h1 {
color: darkblue;
font-family: Arial, sans-serif;
}

p {
color: #333;
line-height: 1.5;
}

5. 📏 Box Model (The Foundation of Boxes)

Every HTML element is an invisible box:

  • content (content)
  • padding (inner space)
  • border (border)
  • margin (outer space)
.box {
width: 200px;
padding: 20px;
border: 2px solid black;
margin: 15px;
}

6. 📐 Positioning

Display

.block { display: block; } /* Span new line */
.inline { display: inline; } /* Continues within the line */
.flex { display: flex; } /* Flexible layout */

Position

.box1 { position: static; } /* Default */
.box2 { position: relative; top: 10px; left: 10px; }
.box3 { position: absolute; top: 0; right: 0; }
.box4 { position: fixed; bottom: 0; left: 0; }

7. 🌈 Tips & Common Mistakes

✔️ Use an external CSS file, avoid inline. ✔️ Define colors with hex (#ff0000) or rgb (rgb(255,0,0)). ✔️ Use a class → Makes it easier for repeating styles. ❌ Styling with an ID → It's too rigid, and you lose flexibility. ❌ Too much !important → It makes your code more complex.


8. 🎯 Mini Exercises

  1. Create a box (div), give it a width of 200px, and a red background.
  2. Center the text and make it blue.
  3. Use flexbox to line up three boxes side by side.

📌 Final Word

CSS brings your web page to life ✨. HTML just asks, "What's there?", while CSS answers the question, "How will it look?" You can create layouts much more easily thanks to modern CSS features like Flexbox and Grid. 🚀

About

Beginner-friendly CSS notes with simple English&Turkish ✨ ----- Basit İngilizce&Türkçe başlangıç ​​seviyesindeki CSS notları✨

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published