You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,21 +25,56 @@ The `starter-code` folder contains an `index.html` file with the main structure
25
25
26
26
### Instructions
27
27
28
-
In this exercise, you will clone a [Medium](https://medium.com/) article. Medium is a site that contains very interesting articles of several topics, we highly recommend you to follow some of the authors if you have interest in [Digital Design](https://medium.com/topic/digital-design), [JavaScript](https://medium.com/tag/javascript), [Bitcoins](https://medium.com/tag/bitcoin), or [Artificial Intelligence](https://medium.com/tag/artificial-intelligence).
28
+
#### Introduction
29
29
30
-
In this exercise, you will clone the [8 Things Every Person Should Do Before 8 a.m.](https://medium.com/the-mission/8-things-every-person-should-do-before-8-a-m-cc0233e15c8d) article. This is a two-part article, where we are going to clone first of all the HTML Structure. In the second part of the exercise, we are going to style this HTML structure.
30
+
In this exercise, you will clone a [Medium](https://medium.com/) article. Medium is a site that contains interesting articles about a variety of topics, we highly recommend you to follow some of the authors if you have interest in [Digital Design](https://medium.com/topic/digital-design), [JavaScript](https://medium.com/tag/javascript), [Bitcoins](https://medium.com/tag/bitcoin), or [Artificial Intelligence](https://medium.com/tag/artificial-intelligence).
31
31
32
-
As you can see, the article is very long. We want you to get focus on the HTML structure, not in the content. In each article section, it's enough to copy-paste three paragraphs of content, not the whole content. For example, in the following section you have to add just the paragraphs in the red box:
32
+
In this exercise, you will clone the [8 Things Every Person Should Do Before 8 a.m.](https://medium.com/the-mission/8-things-every-person-should-do-before-8-a-m-cc0233e15c8d) article. This is a two-part article, where we are going to clone first of all the HTML Structure. Later in the second part, we are going to style this HTML structure.
33
+
34
+
#### Setup
35
+
36
+
As you can see, the article is very long. We want you to get focus on the HTML structure, not on the content. In each article section, **it's enough to copy-paste three paragraphs of content**, not the all of content. For example, in the following section you have to add just the paragraphs in the red box:
As you can see, you just have to add the section's title and the first three paragraphs. You have also to remember that you just have to add the HTML structure. So, for the image above, the result we want is the following:
**As you can see, we don't have any kind of styles here, just HTML and text.** The most difficult part of this exercise is try to figure out what you need to structure the article, so in the next part of the exercise you will not find too many problems while styling the article.
44
+
**As you can see, we don't have any kind of styles here, just HTML and text.** To make this easier to visualize, copy and paste the following into your [**Chrome Console**](https://developers.google.com/web/tools/chrome-devtools/console/) (Ctrl + shift + J on Windows / Linux, Cmd + Option + J on Mac), and hit enter:
45
+
46
+
```javascript
47
+
// disable all externally linked stylesheets
48
+
for (var i =document.styleSheets.length-1; i >=0; i--) {
49
+
document.styleSheets[i].disabled=true;
50
+
}
51
+
52
+
var arAllElements = (typeofdocument.all!='undefined') ?
53
+
document.all:document.getElementsByTagName('*');
54
+
for (var i =arAllElements.length-1; i >=0; i--) {
55
+
var elmOne = arAllElements[i];
56
+
if (elmOne.nodeName.toUpperCase() =='STYLE') {
57
+
// remove <style> elements defined in the page <head>
58
+
elmOne.parentNode.removeChild(elmOne);
59
+
} else {
60
+
// remove per-element styles and style-related attributes
61
+
elmOne.setAttribute('style', '');
62
+
elmOne.setAttribute('size', '');
63
+
elmOne.setAttribute('face', '');
64
+
elmOne.setAttribute('color', '');
65
+
elmOne.setAttribute('bgcolor', '');
66
+
elmOne.setAttribute('background', '');
67
+
}
68
+
}
69
+
```
70
+
71
+
This will make all of the styles disappear!
72
+
73
+
#### Time to Code
74
+
75
+
The most difficult part of this exercise is try to figure out what you need to structure the article, and picking the correct *semantic* tags. This will make your job easier in the next exercise when it comes time to styling.
41
76
42
-
Our recommendation is: try to avoid thinking in the composition, just in the text and images. Try to identify the different sections, and add `id`'s to each `<div>`, `<section>`, `<article>`, or `<header>` block elements to identify this elements. i.e.:
77
+
Our recommendation is: try to avoid thinking in the composition, just in the text and images. Try to identify the different sections, and add `id`'s to each `<div>`, `<section>`, `<article>`, or `<header>` block elements to identify these elements. i.e.:
0 commit comments