+ 2
Using css
How do you use css in web
4 Answers
+ 2
Search on Web
+ 2
Start the CSS course and find out how you can use CSS!
+ 2
To use CSS in a web page, you can:
1. **Inline CSS**: Apply styles directly to an HTML element using the `style` attribute.
   ```html
   <p style="color: blue;">This text is blue.</p>
   ```
2. **Internal CSS**: Define styles within a `<style>` tag in the `<head>` section of your HTML document.
   ```html
   <style>
       body { background-color: lightgrey; }
       h1 { color: green; }
   </style>
   ```
3. **External CSS**: Link to an external CSS file using the `<link>` tag in the `<head>` section.
   ```html
   <link rel="stylesheet" href="styles.css">
   ```
   **styles.css:**
   ```css
   body { background-color: lightblue; }
   h1 { color: red; }
   ```



