Factsheet
Min height and Max height in Media Queries
ELI5: I understand that HTML is for content, CSS for styling, JS for fancy stuff, but exactly what else goes into creating a website like reddit or twitter?
ELI5:CSS
HTML defines content, CSS decorates it and helps tell how it is displayed.
CSS stands for Cascading Stylesheet. This means that there is a hierarchy of style attributes overwriting other attributes that affect the same elements.
Think of it like this. Bob Ross does an oil painting and starts off with a canvas covered in liquid white. This is the lowest level on the hierarchy. It applies to the entire body of the painting, like a class applied to the body tag.
On that he paints some divs of class "mountain". The mountain class has the attribute paint-color:Van Dyke Brown. Since the div is within body the paint-color:Van Dyke Brown attribute overwrites the liquid white and you see the Van Dyke Brown over the liquid white.
He adds some divs of class "happy little tree" which are growing wherever they like, which happens to be on the mountains, so these happy little tree divs are within the mountain divs. Their paint-color:Sap Green is within the mountain div, so where the happy little tree divs are is painted with Sap Green on top of the Van Dyke Brown mountains.
Then Bob adds another happy little tree div. This one he wants to be Alizarin Crimson because its his world and it can be whatever fucking color he god damn pleases. Rather than giving it a special id and using the # selector Bob makes the happy little accident of using an inline style. This overwrites the happy little tree class's paint-color:Sap Green attribute with an inline paint-color:Alizarin Crimson because inline styles cascade over classes.
More on reddit.comELI5: The difference between HTML5, CSS and other web-based languages.
Why should I use CSS?
CSS separates a website’s content from its design; this makes it an essential skill for those who work with websites. The separation supports website loading speed, ensures a consistent user experience across devices, and makes it easy to maintain code.
What are the 4 types of CSS?
There are three primary types of CSS: inline, embedded (sometimes called “internal”), and external; the fourth type is imported, which describes rules placed from an external source.
Is CSS difficult to learn?
Foundational knowledge of CSS can be relatively easy for beginners to learn. More advanced CSS projects require the ability to master the cascade, or override, of rules.