Understanding examples and where things go

Im trying to understand how to interpret a codepen example and how to implement it. Might sound basic but I am not accustomed to MVC.

Like this for example, I tried comparing the creation of slide-boxes to tabs and they look so different in terms of html template implementation and app/controller implementation. Any resources or help would be nice. I assume inline coding is poor practice so I want to avoid just copying and pasting inside a single html file