Skip to content

Commit 67601c1

Browse files
committed
Updates
1 parent 0502062 commit 67601c1

File tree

6 files changed

+58
-39
lines changed

6 files changed

+58
-39
lines changed

exercises/01-Hello-World/README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,34 @@ tutorial: "https://www.youtube.com/watch?v=rbtHLA813pU"
33
---
44
# `01` Hello World in CSS
55

6-
CSS is about styles. To apply styles you always have to follow this steps:
6+
CSS is about adding styles to our HTML elements.
7+
The most basic way to apply a style to an HTML element is to use the html `style` attribute within the tag. This is called "inline styles" and works like this:
78

8-
1. Read the HTML and pick what element do you want to decorate or apply styles to.
9-
2. Programatically select the element you want to style using CSS Selectors.
10-
3. Write the styling that you want by using CSS rules.
9+
```HTML
10+
<a href="google.com" style="color: red; font-size: 14px;">Go to google</a>
11+
```
1112

12-
That is it! The rest is just semantics! 😁
13+
This will set the text color of the link above to red, and the font size to 14 pixels.
14+
In contemporary web design this way of applying styles is discouraged, because it is not efficient - you have to apply styles tag by tag. But you will run into examples of it and need to be familiar with it.
1315

14-
Look at this example:
16+
To apply styles you always have to follow thеse steps:
1517

16-
```HTML
17-
<style>
18-
a {
19-
/* change this style to yellow */
20-
color: pink;
21-
}
22-
</style>
23-
<a href="https://google.com" target="_blank">Click me to open google.com</a>
24-
```
18+
1. Read the HTML and pick what element you want to decorate to apply CSS to it.
19+
2. Apply the style with the `style` attribute as above.
20+
21+
That is it! The rest is just semantics! 😁
2522

26-
We have an HTML anchor `<a>` that takes people to google.com when clicked.
27-
We use CSS to tell (selected) all the anchor tags and make then pink.
2823

2924
## 📝 Instructions
3025

31-
Paste this code on your website to see the results.
26+
1. Within the `index.html` file, create the basic structure of an html page with the appropriate `<html>`, `<head>` and `<body>` tags.
27+
2. Inside of the body of the page, create an `<h1>` tag that reads "HELLO WORLD!!!".
28+
1. Set an inline style to change the text color of the tag to `color: orangered` and give it a solid red border of 1px.
29+
3230

33-
## 💻 Preview
31+
### 💡 Hint:
3432

35-
It should look like this:
33+
- A convenient way to import the basic html structure of your web page is to just type an exclamation mark `!` and select the emmet option that will pop up in Gitpod.
34+
- Read how to apply borders here: https://www.w3schools.com/css/css_border_shorthand.asp
35+
- For this exercise, do NOT use `styles.css` file or `<style>` tag.
3636

37-
![01 Hello World Exercise Preview](https://github.com/4GeeksAcademy/css-tutorial-exercises-course/blob/master/.learn/assets/01-1.png?raw=true)

exercises/03-Inline-Styles/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

exercises/03-Inline-Styles/README.md renamed to exercises/03-List-styling/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
tutorial: "https://www.youtube.com/watch?v=jIMPLzpryuI"
33
---
44

5-
# `03` Inline Styles
5+
# `03` List styling
66

77
Inline styles are a very bad idea unless you have no other choice (and that's a very uncommon situation). Sadly, we have to teach you how to do it because you may need to use them at some point.
88

exercises/03-List-styling/index.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>03 List styling</title>
5+
</head>
6+
7+
<body>
8+
<h2>Your favorite drinks</h2>
9+
<h4>Coca Cola drinks</h4>
10+
<ul class="cocacola">
11+
<li>Coca Cola</li>
12+
<li>Dr. Pepper</li>
13+
<li>Fanta</li>
14+
</ul>
15+
16+
<h4>Pepsi drinks</h4>
17+
<ul class="pepsi">
18+
<li>Pepsi Cola</li>
19+
<li>Mountain Dew</li>
20+
<li>Gatorade</li>
21+
</ul>
22+
23+
<h4>Healthy drinks</h4>
24+
<ul class="healthy">
25+
<li>Kombucha</li>
26+
<li>Kale juice</li>
27+
<li>Sparkling Water</li>
28+
</ul>
29+
30+
<h4>Web-developer drinks</h4>
31+
<ul class="dev-drinks">
32+
<li>Coffee</li>
33+
<li>COFFEE</li>
34+
<li>COFFEE!!!</li>
35+
</ul>
36+
</body>
37+
</html>

0 commit comments

Comments
 (0)