---
tags: mstu5003, tinker, html, css
---
# Tinker: HTML/CSS - Meow Mix
**Group: Meow Mix Group 21**
**Group Name: Suan Kang, Kate Orgera, Kathy Zhu**
See demonstration: https://codepen.io/jmk2142/pen/dVMRRq
**TINKER** - _attempt to repair or improve something in a casual or desultory way, often to no useful effect._
It's funny that the problem is called a "tinker" problem in that tinkering is usually messing around with stuff without a very planned way. I think, when we use the word tinker, it's really to emphasize the _spirit_ of the activity; that is to not feel too pressured into treating it like a test of your ability. It's really meant to be an opportunity for you to explore and have fun messing with stuff while using the guided questions to challenge your understanding.
So in some ways - while the spirit is about tinkering - I actually do want you to explore this in a directed way. That is:
1. Manipulate things to understand the causal effect and relationships it has on the results.
2. Think about the multiple manipulations you make to generalize certain key patterns that manifest across different episodes.
3. To generate hypotheses about how stuff works, and to test those hypotheses (through manipulation) to confirm or reject your ideas and refine.
As such, for each tinker problem which will be a "full" example - I will be providing you with certain guiding questions to help you direct your attention and activities to the _hidden_ things that are present. Think about it as if you just discovered a strange and fascinating new bug crawling across your table. You just want to poke it to see what it does. And I encourage you to do so.
## Tinker Tasks
As a general flow:
- First, take the base codepen and **fork** it.
- This will branch the original code so you have your own copy that you can edit and manipulate.
- Next, **compare** what you see in the code and **map** the relationships between the code and output.
- Then, use the guiding prompts and questions to **manipulate** the actual code **one thing at a time** and _see_ what happens.
- Be able to **articulate** your understanding and share your findings and insights with your weekly group and/or the class.
Note that I use Markdown as the format for these things as it is pretty `programming friendly`. You can get a basic understanding of Markdown in a few minutes using the following interactive tutorial: http://www.markdowntutorial.com
---
## Tinker GUIDES and QUESTIONS
I've divided this up into parts. Basically - as you explore the example and manipulate it in various ways there are a few themes that you should keep in the back of your mind:
1. SEQUENCE - **The order of elements on the page**
2. HIERARCHY - **The relatioships of parent -> child elements, Sibling elements, etc. There is some overlap with "Sequence", but they aren't the same.**
3. ORGANIZATION (Semantics) - **Header vs body content?**
4. PATTERNS (Generalizable syntax patterns) - **multiple sections and divides**
### HTML things
- Mess around with the sequence of different tags.
- How does _SEQUENCE_ affect the visual display of HTML elements?
- **They were rearranged as we changed the order of opening and closing tags. Sizes changed, page elements changed (the whole page became gray since we didn't close the box)**
- Change the hierarchy, the parent-child relationships between different tags.
- What are some ways that the _hierarchy_ of your tags will affect the end result / visual output?
- **Doesn't effect the visual output as much as expected for certain changes (changing header and section order) while for others, it looks wierd (putting the header beneath the body paragraph)**
- Add/remove/manipulate various `elements`, `ids`, `classes`, `attributes`
- What did you do and what did you discover in terms of the GENERALIZABLE patterns?
- **Removing 'div' tags under "Cat Opinions" deleted all the content that had been between the tags, but not the image (which came before it)**
- Try to add an embedded Youtube video in the `section#videos` tag.
- Before you do, take a guess as to what you expect to see as the visual result. Were your guesses correct?
- **Guess: Hopefully a video player will be embedded in the page. We were correct on the video playewr embedding, but the default size came out bigger than we expected. We tried to play around with the width to make it fit the page better.**
- Create some notes as _comments_ in this code.
- What are some ways that you can use comments to help you understand your code better?
- **Helps us give notes to ourselves that won't show up on the page so we can adjust later. Helps us to separate sections as we're learning how to read the code.**
- Take a look at the following:
- What is the generalizable syntax **_pattern_** between all these tags?
- **The tags all have attributes, they all have opening and closing tags (unless they are self-closing like the _img_ tag). Pattern of tag, content, closing tag (unless self-closing). At the very least there has to be an opening tag.**
- **`<tag attribute="value">content</tag>`**
```html
<div id="mainStory">...</div>
<p class="important">Lorem ipsum...</p>
<span class="incorrect">Your answer</span>
<img src="https://placehold.it/50x50/4CAF50" alt="greenbox">
<input type="text" name="fullName" value="anonymous">
```
- Take a look at the following cheetsheets: [HTML5 Cheatsheet]
- Muck around with the page and try to add a new content feature using some _new_ elements you haven't directly worked with in FCC.
- How did you go about learning how to utilize a new element (process)?
- **Try different elements in codepen and see what's happening.**
- How can different `elements`, `classes`, and `id`s help to _organize_ our html content?
- **'ids' can help us identify unique elements, while 'classes' can help us edit multiple elements with the same id or other label.**
### CSS things
- Take a look at the following _almanac_ of CSS selectors and properties: [30 CSS Selectors], [CSS Tricks Almanac] and use some new selectors and css properties to change the visual look of the page.
- Why do we have so many different kinds of CSS selectors available?
- **To solve different problems that might come up in designing the page, so we can change to any element we want.**
- Take a look at the following:
- What is the generalizable syntax **_pattern_** between all these css rules?``
```
- Selector {property: value;}
```
- Classes have a . in front, properties can include physical features like colors and font types, sizes, etc. Values specify which we want. And each value needs a ; after it to make it work.
```css
div {
font-size: 10px;
}
div, span {
color: dodgerblue;
}
div#myFavorites {
text-decoration: underline;
}
div.incorrect {
text-decoration:line-through;
}
div span {
color: green;
}
div > span {
color: lime;
}
div:only-child {
font-family: cursive;
}
```
- Probably, no programmer knows every CSS rule and/or property by memory. I certainly don't, but I know a lot.
- How then, should you go about studying resources like [30 CSS Selectors] and [CSS Tricks Almanac] to help you become a more capable and efficient programmer?
- **Practice on your own, maybe make a spreadsheet to refer to?**
### COMBINED and META things
- How might HTML sequence and hierarchy of tags affect your CSS rules?
- **Since the CSS has to refer to the HTML tags, it's very important to use the correct tags. You can have CSS affect a whole 'div' section, or just the header or paragraph.**
- There are many things that can go wrong when you code an HTML/CSS page. Your HTML might be wrong. Your CSS might be wrong. It's pretty difficult to debug/fix when you have more than one thing wrong at the same time.
- Based on your understanding of how _sequence, hierarchy, syntax_ affects the page; What do you think are best practices to systematically fix errors in your code?
- **Check the HTML first, since CSS has to refer to that. Then, see if CSS was tagged correctly. Look at the indentations to see the hieracrchy more clearly. Then check the syntax last to see if we missed any closing tags.**
- Based on said understanding, what are some best practices to reduce errors _as you code?_
- **Check every coding carefully before move to the next one.**
- What is the _STRENGTH_ of FCC exercises and what is the _LIMITATION_ with respect to learning and understanding?
- **Strength: It's a good way to get familiar with different elements and attributes. Also, it's a good way to see how the programming actually runs. Because there is a tutorial, we can understand the logic of each step.**
- **Limitation: The determination of right or wrong is kind of strict, so we don't have the chance to try different possibilities.**
- What is the _STRENGTH_ of tinkering and what is the _LIMITATION_ with respect to your learning and understanding?
- **Strength: It's a good way for reviewing Jin's video, good to practice collaborating in a team, and good to really consider questions of how the process of coding works.**
- **Limitation: We may be more likely to fall back on familiar tags instead of trying out new ones, unless instructed to do otherwise.**
- What kinds of things did your group members learn, notice, experience that you did not and **why** do you think that is with respect to **HOW** you each respectively studied the materials?
- **Kathy did not notice the difference between structure and hierarchy, though the whole group struggled to truly define it. We think this might be because the concepts are very similar and we haven't done enough coding to really know the difference. Suan couldn't understand the difference of each concepts such as elements, selectors and property, but through group work we could be more familiar with the concepts and clearly understood it. Kate noticed that watching the video right before class wasn't really enough to absorb the information and tinkering and FCCs helped more.**
### Tinker experience to Collaboration
This is your tinker activity. Play with this page and manipulate things to make it "yours" in terms of the understanding. The purpose is to give you a sandbox to try things in the guide, as well as your OWN ideas and inquiries.
This activity provides the anchor point for your collaborative discussion. As such:
1. Tackle each question _by yourself first_ so you can get a sense of what you understand and what you may not.
- TOTALLY okay to not be able to answer every question yourself at first.
- That's what the social collaboration is for.
2. Write out your responses to the questions to guide your collaborative work. I would like you to use Markdown format for your tinker-problem responses / submissions. (Using Word, Google Docs, is going to be very tricky and messy when it comes to writing CODE as notes.)
3. In your collaborative discussions, share your individual answers and use it as a starting point for your group discussions.
4. Use the collaboration tool like codepen to code together as you discuss and make examples of what you discovered together.
5. Generate a final _group_ response to each of the questions I ask above to come up with your _final answer_ as a team. It's less about what is right or wrong, more about being able to articulate what you learned and how you generated a deeper understanding by sharing what you individually understood into a bigger more comprehensive whole.
Additionally, you might want to also use that time (or times) together to help each other with the mini-problem or project of the week.
**_GOOD LUCK, HAPPY CODING!_**
[30 CSS Selectors]: https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
[CSS Tricks Almanac]: https://css-tricks.com/almanac/
[HTML5 Cheatsheet]: https://websitesetup.org/html5-cheat-sheet/