- On a website, what is the purpose of HTML code? To create the structure and layout of the webpage.
- What is the difference between an element and a tag? An element comprises the opening tag and the closing tag and any content that lies between them.
- Why do we use attributes in HTML elements? Attributes provide additional information about the contents of an element.
- Describe the purpose of the head, title, and body HTML elements. They're use is to reflect a hierarchy of information.
- In your browser (Chrome), how do you view the source of a website? From the "customize and control" button on the top right, select "more tools," followed by "developer tools."
- List five different HTML elements and what they are used for. For example,
<p></p>
is a paragraph element, and it is used to represent a paragraph of text.<h1></h1>
is used for main headings,<h2></h2>
is used for subheadings,<b></b>
make characters appear bold,<i></i>
make characters appear italic, and The<sup>
element is used to contain characters that should be superscript such as the suffixes of dates or mathematical concepts like raising a number to a power. - What are empty elements? They are elements that do not have any words between an opening and closing tag.
- What is semantic markup? Html elements which provide extra information; such as where emphasis is placed in a sentence, that something you have written is a quotation (and who said it), the meaning of acronyms, and so on.
- What are three new semantic elements introduced in HTML 5? HTML5 uses the
<abbr>
element for both abbreviations and acronyms,<cite>
should not really be used for a person's name, and the<s>
element indicates something that is no longer accurate or relevant (but that should not be deleted).
- There are three main types of lists in HTML: ordered, unordered, and definition. What are their differences? Ordered uses numbers, unordered uses bullets, and definition simply defines a specific term(s)'(s) definition(s).
- What is the basic structure of an element used to link to another website? element with the href attribute followed by the desired website's qualified url.
- What attribute should you include in a link to open a new tab when the link is clicked? The target element within the opening tag with a value of _blank.
- How do you link to a specific part of the same page? place the id attribute withing the opening tag of the specified section of the page, and place the # of the same attribute within the opening tag before the text description of the specified link.
- What is the purpose of CSS? It associates style rules with html elements of code, affecting how the elements are visually displayed.
- What does CSS stand for? What does cascading mean in this case? CSS stands for Cascading Style Sheets. Cascading in this sense means "to arrange (a number of devices or objects) in a specific series or sequence.
- What is the basic structure of a CSS rule? It contains both a selector indicating which element the rule applies to, and a declaration indicating how the elements referred to in the selector should be styled.
- How do you link a CSS stylesheet to your HTML document? With the element, followed by the href, type, and rel attributes guiding the path to the specific CSS files.
- What is it useful to use external stylesheets as opposed to using interal CSS? With external stylesheets, you can edit the html for websites with more than one page, providing editing uniformity as well as allowing for less work when editing, avoiding editing singular sections of multiple pages of internal CSS.
- Describe what a color hex code is. It is a six-digit code that represent the amount of red, green and blue in a color, preceded by a pound or hash # sign.
- What are the three parts of an HSL color property? Hue, Saturation, and Lightness.
- In the world of typeface, what are the three main categories of fonts? What are the differences between them? Serif (having extra details on the ends of the main strokes), Sans-Serif (having straight ends to letters), and Monospace (having a each letter the same width, also known as fixed-width).
- When specifiying font-size, what are the main three units used? Weight, Style, and Stretch.
- If you're using an input element in a form, what attribute controls the behavior of that input? It's behavior is determined by the type attribute.
- What element is used to create a dropdown list? The select element.
- If you're using an input element to send form data to a server, what should the type attribute be set to? Type should be set to "text," "password," "radio," "checkbox," "file," "image," "hidden," "date," "search," and/or "submit."
- What element is used to group similar form items together? That would be the fieldset element.
- Describe the differences between border, margin, and padding. A border is the perimiter of a box, a margin is the space outside of a box's border or the space between the bordersof a box inside of another, and padding refers to the space between a border and the thext elements within it.
- For a CSS rule padding: 1px 2px 5px 10px, what sides of the content box does each pixel value correspond to? Top, right, bottom, and left.
- Describe the difference between block-level and inline elements. Block-level elements appear to create a new line while Inline elements follow in between surrounding text.
- What is the role of fixed positioning, and why is z-index important in the scenario of using fixed positioning? Fixed positioning positions the element in relation to the browser window. Therefore, when a user scrolls down the page, it stays in the exact same place. If you want to control which element sits on top, you can use the z-index property. Its value is a number, and the higher the number the closer that element is to the front. For example, an element with a z-index of 10 will appear over the top of one with a z-index of 5.
- What is the difference between a fixed and liquid layout? Liquid layout designs stretch and contract as the user increases or decreases then size of their browser window and They tend to use percentages. Fixed width layout designs do not change size as the user increases or decreases the size of their browser window and Measurements tend to be given in pixels.
- In an image element, why is the alt attribute important? Alt provides a text description of the image which describes the image if you cannot see it.
- What determines if an image element is inline or block? Whether the text that surrounds the image falls in the same line as the image or starts on a new line.
- What are the benefits of jpg or png image file formats? Jpg is great for images with a multitude of colors and Png is great for images that have minimal colors and more graphical shapes without borders.
- What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML? Specifying image sizes helps pages to load more smoothly because the HTML and CSS code will often load before the images, and telling the browser how much space to leave for an image allows it to render the rest of the page without waiting for the image to download.
- What is an image sprite, and why is it useful? When a single image is used for several different parts of an interface, it is known as a sprite. The advantage of using sprites is that the web browser only needs to request one image rather than many images, which can make the web page load faster.
- There are three big data types in JavaScript: numbers, strings, and booleans. Describe what each of them are. Values of the number type are, unsurprisingly, numeric values. In a JavaScript program, they are written as "13." Strings are used to represent text. They are written by enclosing their content in quotes. Often, you will need a value that simply distinguishes between two pos- sibilities, like “yes” and “no” or “on” and “o ”. For this, JavaScript has a Boolean type, which has just two values: true and false (which are written simply as those words).
- What are the three logical operators that JavaScript supports? Logic and (&&), logic or (||), and logic not (!).
- What is the naming convention used for variables? Variable names can be any word that isn’t a reserved word (such as var). They may not include spaces. Digits can also be part of variable names—catch22 is a valid name, for example—but the name must not start with a digit. A variable name cannot include punctuation, except for the characters $ and
_.
- What is the difference between an expression and a statement? A fragment of code that produces a value is called an expression. If an expression corresponds to a sentence fragment, a JavaScript state- ment corresponds to a full sentence in a human language. The simplest kind of statement is an expression with a semicolon after it.
- What are a few JavaScript reserved words, and why are they important to avoid using them for variable names? "break case catch class const continue debugger default delete do else enum export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield". It is important not to use these keywords for variable names because they possess a preexisting function, which if used could cause problems when a variable definition needs to be utilized.
- What is control flow, and why is it useful for programming? This way, When your program contains more than one statement, the statements are executed, predictably, from top to bottom. It is the simplest way for programming because the output elements of values are organized in the order thay they're input and can be elaborated on more efficiently.
- If we have a function defined as function sayHello(){console.log("Hello!")}, what is the difference between entering sayHello and sayHello() in the console? The function has to be typed in full to get the reaction message. The parentheses are a part of the full type of the function.
- What is the keyword return used for? It lets you immediately break out of a function call, possibly returning a value.
- What are function parameters? The parameters to a function behave like regular variables, but their initial values are given by the caller of the function, not the code in the function itself.
- What is the naming convention used for function names? Function variables usually simply act as names for a specific piece of the program. Such a variable is de ned once and never changed.
- "Psycology"-Are you assuming they know something that they haven’t learned yet? bad, good
- "Usability"-Is it easy to find (good), hard to miss (better), or subconsciously expected (best)? poor search usability, great
- "Design"-Does it communicate the purpose and function without words? yes, no
- "Copywriting"-Is it clear, direct, simple, and functional? incorrect info, correct and updated
- "Analysis"-Are you looking for subjective opinions or objective facts? opinions, reputable sources