Why do programmers like dark mode? Because light attracts bugs.

Stenefra
3 min readNov 13, 2020

--

What excites me the most about coding, and how do I think coding can change the world?

The thing that excites me most about coding is the idea that there is so much out there to learn. I’ve already built a strong foundational knowledge in HTML, CSS, and JavaScript, so what’s next? For a while I wasn’t sure. Should I try to learn different languages? And then it hit me, I can do just about anything I want to do in JavaScript, so why has it taken me so long to see what else is possible with that one language.

Since setting off in this direction I’ve rapidly boosted my fundamental understanding of what JavaScript actually does under the hood, and now I’m hooked. I still hit hurdles every day, but what keeps me motivated to push past them is the idea that on the other side lies freedom. That’s what excites me the most, the freedom to express myself and my work in any way I want through JavaScript.

And do i think coding can change the world? Of course, it already has. Software and application built through coding is the future of industry, and better yet, has changed billions of lives for the better, even just by providing a minor convenience. As somebody who has made every career decision with “how can I help others” in mind, I can’t help but be excited by the idea that I can change lives through coding.

What does doctype at the top of the HTML file do? Why does this need to be specified?

Doctype stands for Document Type Declaration, and just like it sounds it’s used to tell the browser what markup language, what version of HTML, it should be expecting within the document it’s about to read. Currently, browsers will automatically add the doctype for HTML5 if nothing is declared, but if the markup is from a previous version of HTML it will behave differently since previous versions have different rules than HTML5.

How does a browser determines what HTML Elements match a CSS selector.

Browsers match selectors from right to left. Meaning it first finds the key selector, and follows the tree to the specific element. Meaning if an element is given a class or id, the browser will only find elements associated with that class or id, whereas if CSS selectors are only the element itself, the browser will match the CSS with every element of that kind on the DOM.

What’s the difference between and HTML Element and an HTML Tag?

An HTML Element is a structure that includes a start tag, content, and an end tag.

An HTML Tag is used to define what the content within it is and is used to create an HTML Element.

For example:

Explain the Cascade of CSS:

Cascade in CSS is the concept that determines what rule applies if multiple styles in the CSS apply to an element. Due to Cascade, the rule that comes last in the CSS is what applies. This means that every styling is the rule UNTIL an exception for a specific element or another style that disagrees with the former styling, is defined further down in the document.

The 3 ways to link/use CSS in an HTML file to style a web page:

  1. Using the <style></style> element in the <head> of the document.
  2. Inline styling, where each HTML element is styled individually.
  3. External stylesheet that is linked in the <head> of the document. This allows the developer to apply styles to multiple elements at a time while keeping the HTML file free of CSS styling markup.

--

--

Stenefra
Stenefra

No responses yet