Here we go!

Ramon Cruz-Hinojosa
3 min readFeb 15, 2021
  1. What excites you about coding? How do you think it can change the world?

Coding is great. I’ve been interested in coding ever since I was a kid who’d heard about a “bot” in an online game I used to play. I understand now as an adult that there are an infinite number of ways to use coding for personal or work uses. Just recently a friend of mine created what he calls a reddit post checker.

While these applications of coding are great, these are more of a hobby type project. To answer the question “How do you think coding can change the world?”, all you have to do is look around. Technology is used in everything, no matter where you look. Technology and coding are one and the same and through that coding has already changed the world for the better. All we have to do is follow up on the ideas the technological geniuses before have come up with. Or better yet come up with something new and groundbreaking ourselves.

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

Doctype describes the type of HTML that is going to be used in the webpage.

Not specifying a doctype can make it really difficult to have your webpage render correctly across the many different web browsers.

3. Explain how a browser determines what HTML elements match a CSS selector?

A browser will look through CSS selectors from right to left from the stylesheet.

an example would be:

<h1><span></span></h1>*This line is what would be on your html file*

*the next few lines are what are on your stylesheet*

h1 > span {

all of your fancy properties/values go here

}

Normally you’d use classes and id’s to make your styling more specific to a certain element. Otherwise you could accidentally set a style to all of the same element instead of one specified one on your webpage.

4. What’s the difference between an HTML element and and HTML tag?

An HTML element is the combination of an opening tag, attributes, close tag and everything within the opening and closing tag.

An example would be:

<a href=”websiteurl”>Website link in text</a>

The <a></a> are the tags that define the element.

href=”” would be the attribute for this element

5. In your own words, explain the cascade of CSS.

The CSS cascade is an algorithm that looks at CSS declarations in order to decide the correct value for that property. Then based on the selected element the specified property/value are applied. These declarations can come from multiple different sources. A User-agent stylesheet, an Author stylesheet and a User stylesheet.

6. Explain, to someone you know, the 3 ways to link/use CSS in an HTML file to style a web page.

The first way to link/use CSS would be externally. This is the cleanest way to style your webpage without cluttering your html file with tons of style properties and values. You do this by linking your stylesheet in the head of your webpage. Here’s an example.

<!DOCTYPE html>
<html>
<head>
<link rel=”stylesheet” href=”mystyle.css”>
</head>
<body>

</body>
</html>

The second way to use CSS would be to define your stylesheet inside your html file with a style element. This method of using CSS is only used when one single webpage has a unique style. This style element would also go in the head of the html file and would look like this.

<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}

h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

The third way to use CSS would be inline CSS. This is useful for testing and previewing changes to a webpage and as a temporary last resort fix. Here’s an example.

<!DOCTYPE html>
<html>
<body>

<h1 style=”color:blue;text-align:center;”>This is a heading</h1>
<p style=”color:red;”>This is a paragraph.</p>

</body>
</html>

Hopefully this gives you a look into my thoughts and experience on coding. I am a beginner but everyone has to start somewhere.

--

--