Answer these Check for Understanding questions as you work through the assignments.
-
What is HTML? HTML is the standard markup language for Web pages.
-
What is an HTML element? HTML elements tell the browser how to display the content
-
What is an HTML attribute? Attributes provide additional information about elements
-
What is the difference between a class and an id? When would you use one vs. the other? The class attribute is often used to point to a class name in a style sheet. The id attribute specifies a unique id for an HTML element. The value of the id attribute must be unique within the HTML document. The id attribute is used to point to a specific style declaration in a style sheet.
-
What HTML would you write to create a form for a new dog with a "name" and an "age"?
-
What are semantic tags? When would you use them over a
div? A semantic tag describes its meaning to both the browser and the developer. Its to define different parts of a web page -
Explain what each of the following HTML tags do and when you would use them:
<h1>,<h2>, etc. Defines HTML headings<p>Defines a paragraph<body>Defines the document's body<a>and thehrefattribute Defines a hyperlink<img>and thesrcattribute Defines an image<div>Defines a section in a document<section>Defines a section in a document<ul>,<ol>, and<li>ul: Defines an unordered list ol: Defines an ordered list li: Defines a list item<form>Defines an HTML form for user input<input>Defines an input control
-
What is CSS? CSS is the language we use to style an HTML document. CSS describes how HTML elements should be displayed.
-
What is a CSS selector? How do you use the ID selector? The class selector? CSS selectors are used to "find" (or select) the HTML elements you want to style. The id selector uses the id attribute of an HTML element to select a specific element. The class selector selects HTML elements with a specific class attribute.
-
What are the three ways to include CSS in your HTML documents? What are the pros and cons of each? Include via external file (External CSS) Include via style tag on a page (Internal/Embedded CSS) Include via inline styling (Inline CSS)
Pros:
All styles are stored in one separate file, thus easier to manage and maintain; Ability to include multiple different files if needed; The CSS file can be minified meaning decreased size in bytes.
Cons:
Linking external files creates render-blocking content which affects page load speed; May contain styles that are not used on a particular page, thus loading unused code.
- What is the Box Model? Describe each component of the Box Model. In CSS, the term "box model" is used when talking about design and layout. Content - The content of the box, where text and images appear Padding - Clears an area around the content. The padding is transparent Border - A border that goes around the padding and content Margin - Clears an area outside the border. The margin is transparent
-
What is a database? A database is an organized collection of structured information, or data, typically stored electronically in a computer system.
-
What is SQL? SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system.
-
What is SQLite3? for experiments and local development, never use in production
-
What is a Table? A way to organize data
-
What is a primary key? A primary key is the column or columns that contain values that uniquely identify each row in a table
-
What is a foreign key? A column or combination of columns that is used to establish and enforce a link between the data in two tables to control the data that can be stored in the foreign key table.
-
Explain what each of the following SQL commands do:
- insert - inserts new data into a database
- select - extracts data from a database
- where - to filter records
- order by - sort the result-set in ascending or descending order
- inner join - selects records that have matching values in both tables
-
How can you limit which columns you select from a table? select
-
How can you limit which rows you select from a table? where
-
How can you give a selected column a different name in your output? select as
-
How can you sort your output from a SQL statement? order by
-
What is joining? When do you need to join? to combine rows from two or more tables11. What is an aggregate function?
-
List three aggregate functions and what they do. count, sum, min
-
What does the
groupstatement do? groups rows that have the same values into summary rows -
How does the
groupstatement relate to aggregates? GROUP BY aggregates the results on the basis of selected column: COUNT, MAX, MIN, SUM, AVG, etc. GROUP BY returns only one result per group of data.
**Copy and Paste the link to your Task Manager repo here:https://github.com/samivari/task_manager_rails **Copy and Paste the link to your Static Challenge here:https://github.com/samivari/static_challenges
-
Define CRUD. the four basic operations (create, read, update, and delete)
-
Define MVC. Model–view–controller is a software design pattern commonly used for developing user interfaces that divide the related program logic into three elements.
-
What three files would you need to create/modify for a Rails application to respond to a
GETrequest to/tasks, assuming you have aTaskmodel. routes.rb, task_controller.rb, task.rb -
What are params? Where do they come from? an alias for the parameters method.
-
Check out your routes. Why do we need two routes each for creating a new Task and editing an existing Task? those are two different commands