Starting a new chapter
As generic as that title sounds, it still feels accurate. Exploring a new career and skill set at 40 is a little nerve racking. It’s been 17 years since I’ve taken a class of any sort. But if I’ve learned anything in that time, it’s that I’m capable of more than I give myself credit. I’ve always been able to focus and dedicate myself to whatever task I have ahead of myself. Whether it’s teaching myself to screen print, learning new software, working on my car, building with wood, or anything else. Unfortunately, grammar is still not my strong suit so bear with me.
My first assignment for class is to complete some interview questions so I’ll jump into those and see where we go from here.
What excites you about coding? How do you think it can change the world?
The thing that excites me the most about coding is the challenge. I have dabbled a little with various bits of coding in the past. But this is the first time I’m jumping headfirst into fully learning it. It makes me a little nervous for various reasons. The biggest reason is that it will force me to think in new ways to achieve the result I want. It will be a blend of logical and creative thinking to find the answers I’ll need. But that is also what’s exciting. Coding changes the world every day already. Most people take it for granted by not realizing what goes into their favorite websites, apps, and programs. And with each year the digital world we live through grows and evolves even more. The next evolution may bring us into a more seamless blend of real and digital life.
What does doctype
do at the top of your html file? Why does this need to be specified?
“Doctype” is a declaration that tells the visitors web browser what kind of document it’s about to encounter. It’s not a html element but is read first so the browser knows that the rest of the document will be the specified kind of language and it can read it properly. <!DOCTYPE html> tells the browser that the document is written in HTML 5 by default. There are ways to specify other versions of HTML, but 5 is the current standard.
Explain how a browser determines what HTML elements match a CSS selector?
A browser will match CSS selectors to the elements through several levels of specificity. In the CSS stylesheet, standard elements can be selected just by declaring their name and putting the style properties into a declaration block. So and h2 element can be styled by declaring; h2 { style}. But elements with class or ID names are matched differently. A class name is called by adding a “.” to the style like; .className { style}. And an ID is similar except it uses the hash symbol at the start; #idName {style}.
What’s the difference between an HTML element and and HTML tag?
An HTML element and tag are part of each other. A HTML tag is the declaration marks for what the content will appear as in the document. There are many different tags that can be used and they generate various results. Some look like: <body>, <span>, <p>, <h3>, and so on. Each tag also needs to be closed after the content it contains like so; </body>. But in doing so, it creates an element. The opening tag, content, and closing tag are the components of the element and can be as simple as a single string like <h1>Hello world</h1> or they can contain a number of other elements to create a whole section of the web page.
In your own words, explain the cascade of CSS?
There are several levels to matching CSS rules to elements. And many of them can overlap, hence the cascading part of CSS. As far as specificity, the browser starts with the most general rules but are overridden by the more specific ones. General rules can apply to the basic elements of the HTML document; body, article, h1, p, button, etc. But even within those elements, there is specificity. A body style can apply, let’s say, a font color to a whole document. But then a article style can override that for any article elements within the body. Then adding a class to any element can help target that specific element and any others with that same class. Class styles will then override any generic element styles. So a “p” element with a class inside an article element can have another color. And and element with an ID is the most specific. There can only be one ID’d element on a document. And that ID will override any class or generic style below it. It is like a stepped waterfall. And each pool changes the color and shape of the water. But from the bottom, you can only see the falling water as a whole.
Explain, to someone you know, the 3 ways to link/use CSS in an HTML file to style a web page.
I feel like we’ve gotten to know each other well by this point so let me talk about the ways to use CSS in a HTML document. There are three ways that it can be used although only one is the preferred way in most cases. The first way is called ‘inline”. That’s where the style declaration is written inside the opening element tag at the value of the “style” property. It allows for adding styles as you go without a need for a separate CSS file. But it can get muddy with too many styles and becomes very hard for other developers to read. Next is to create a <style> element in the head of the document. Within this element, style rules can be written with white space and indention for easier reading. But too many rules will make the document very long and those rules can only apply to that document. That’s where the last, and best way, comes in. Writing all of you CSS rules on a separate .css document and then link it in the head with a <link> tag. This allows you to keep your HTML document clean of extra clutter as well as create a set of style rules that can be used across multiple pages.
So between this blog and my hero landing page project, I begin my journey with Austin Coding Academy. It will be challenging and fun and I don’t know exactly where it will take me. But that’s what a new chapter should be like, every page will be something unexpected.