+ 1

How to do css

11th Sep 2025, 11:10 AM
ibtihal imtiaz
ibtihal imtiaz - avatar
4 ответов
+ 2
CSS is used to style HTML — colors, fonts, layout, spacing, and more. Ways to Apply CSS: Inline CSS – directly in HTML tags: <p style="color: red;">Hello</p> Internal CSS – inside <style> in HTML: <head> <style> p { color: blue; font-size: 18px; } </style> </head> External CSS – separate .css file linked in HTML: <link rel="stylesheet" href="styles.css"> /* styles.css */ p { color: green; font-size: 20px; } Basic CSS Concepts: Selectors: Target elements to style (p, h1, .class, #id) Properties & Values: Define style (color: red; font-size: 16px;) Box Model: Every element has content, padding, border, margin Positioning: static, relative, absolute, fixed, sticky Flexbox & Grid: For layout and alignment Example: <!DOCTYPE html> <html> <head> <style> body { background-color: #f0f0f0; font-family: Arial, sans-serif; } .highlight { color: red; font-weight: bold; } </style> </head> <body> <p>Hello, this is normal text.</p> <p class="highlight">This text is highlighted in red!</p> </body> </html> Good Luck!
11th Sep 2025, 3:07 PM
Riyadh JS
Riyadh JS - avatar
+ 1
Entangle into the Web Development (HTML + CSS + JS) or Introduction To CSS (Only CSS) course in the learning section.
11th Sep 2025, 1:52 PM
Unknown Decoder
Unknown Decoder - avatar
0
Thanks and how to do gradient
12th Sep 2025, 1:37 AM
ibtihal imtiaz
ibtihal imtiaz - avatar