|
| 1 | +// Level 3 |
| 2 | + |
| 3 | +/* |
| 4 | + WooHoo, you got so far on your first day! Great! But we still have more things for you. |
| 5 | + First of all, go to index.html file and replace our script from level2.js to current |
| 6 | + file - level3.js |
| 7 | + */ |
| 8 | + |
| 9 | +/* |
| 10 | + Here we will talk a bit more about HTML, CSS and how JS can interact with them. |
| 11 | + So HTML - stands for Hyper Text Markup Language. It is a structure of the elements |
| 12 | + on the page. |
| 13 | +
|
| 14 | + HTML: |
| 15 | + As you noticed it is divided on elements that looks like that: |
| 16 | + <header></header>, <p></p> etc - it is tags, each element on the page has opening |
| 17 | + and closing tag (NOTE: some tags are self-closing like <img>). Whole html file is wrapped |
| 18 | + in tag <html>, which contains of <head> and <body> tags. In <head> we keep different |
| 19 | + meta information, title and link to css files. <Body> contains our actual content. |
| 20 | + Tags has a set of names which you can find here http://htmldog.com/references/html/tags/ |
| 21 | +
|
| 22 | + Any tag also can have different properties (<div class="settings"></div> - tag div |
| 23 | + has a property class, that has name = 'settings'). |
| 24 | +
|
| 25 | + CSS: |
| 26 | + Stands for Cascading Style Sheets. CSS describes how HTML elements are to be |
| 27 | + displayed on screen. As you can see in css file when we need to target any element |
| 28 | + we can simply refer to the tag itself (footer{color: white;}), or to any property (class |
| 29 | + via '.settings', id via '#logo' etc). The list of css properties is huge, you can check |
| 30 | + on it here https://www.w3.org/TR/CSS21/propidx.html but don't worry, you don't need to |
| 31 | + remember it all. |
| 32 | + PS: difference between id and class is that tag with specific 'id' should be unique on |
| 33 | + the page, but many tags can have same class within the same page. Use 'id' only if |
| 34 | + you really need it!! |
| 35 | + */ |
| 36 | + |
| 37 | +/* |
| 38 | + Phew, lot's of new things. But let's come back to javaScript and see how we can interact |
| 39 | + with html. |
| 40 | + */ |
| 41 | + |
| 42 | + |
| 43 | +/* |
| 44 | +
|
| 45 | + */ |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
0 commit comments