Skip to content

Commit 7d67f6c

Browse files
authored
Merge pull request #31 from narendra-dhangar/patch-2
Update how-to-add-css-to-html.md
2 parents 9f8b8dd + 1f61a09 commit 7d67f6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/css/introduction/how-to-add-css-to-html.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ keywords:
3232
css tutorial for beginners 2025,
3333
css tutorial for learning,
3434
]
35+
hide_table_of_contents: true
3536
---
3637

3738
In this tutorial, you will learn how to add CSS to an HTML document using internal, external, and inline styles. CSS (Cascading Style Sheets) is a style sheet language that is used to describe the look and formatting of a document written in HTML or XML. It allows you to style web pages and user interfaces, making it easier to create visually appealing and responsive websites.
3839

3940
<AdsComponent />
41+
<br />
4042

4143
## How to Add CSS to HTML
4244

@@ -81,6 +83,7 @@ When you run this HTML document in a web browser. It will display the content wi
8183
</BrowserWindow>
8284

8385
<AdsComponent />
86+
<br />
8487

8588
### 2. External CSS
8689

@@ -116,6 +119,7 @@ h1 {
116119
In this example, the CSS styles are defined in a separate file named `styles.css`, which is linked to the HTML document using the `<link>` element. The styles defined in the external CSS file are applied to the elements in the HTML document.
117120

118121
<AdsComponent />
122+
<br />
119123

120124
When you run this HTML document in a web browser. It will display the content with the styles defined in the external CSS.
121125

@@ -157,6 +161,7 @@ When you run this HTML document in a web browser. It will display the content wi
157161
By using internal, external, and inline CSS, you can style web pages and user interfaces to create visually appealing and responsive websites.
158162

159163
<AdsComponent />
164+
<br />
160165

161166
:::note
162167
1. Make sure the `styles.css` file is in the same directory as the `index.html` file.
@@ -177,4 +182,4 @@ By using internal, external, and inline CSS, you can style web pages and user in
177182

178183
## Conclusion
179184

180-
In this tutorial, you learned how to add CSS to an HTML document using internal, external, and inline styles. Internal CSS is added within the `<style>` element in the `<head>` section, external CSS is added in a separate CSS file and linked to the HTML document using the `<link>` element, and inline CSS is added directly to an HTML element using the `style` attribute. By using these methods, you can style web pages and user interfaces to create visually appealing and responsive websites.
185+
In this tutorial, you learned how to add CSS to an HTML document using internal, external, and inline styles. Internal CSS is added within the `<style>` element in the `<head>` section, external CSS is added in a separate CSS file and linked to the HTML document using the `<link>` element, and inline CSS is added directly to an HTML element using the `style` attribute. By using these methods, you can style web pages and user interfaces to create visually appealing and responsive websites.

0 commit comments

Comments
 (0)