Answer these Check for Understanding questions as you work through the assignments.
- What is HTML?
- Hyper Text Markdown Language
- Standard markup language for web pages
- decribes structure of web page
- displays content on webpage
- What is an HTML element?
- An element is a peice of HtML. Elements are used to define and display text, images or any "element" on a HTML doc.
- What is an HTML attribute
- All HTML element can have attributes
- Attributes are defined in the beginning of the HTML tag
- Provide additional information about the element
- What is the difference between a class and an id? When would you use one vs. the other?
- 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
? - Explain what each of the following HTML tags do and when you would use them:
<h1>
,<h2>
, etc.
- these decribe a heading and defines the size of the heading.
<p>
- This describes a paragraph in the webpage
<body>
- defines the documents body. Hewre is where headings,paragraphs, links, images etc.
<a>
and thehref
attribute
- links are defined using the <a--, the destination or link is defined using the href
<img>
and thesrc
attribute
- img is the tag for an image while the source path of the image is defined using src="image_source"
<div>
- defines a section in a document
<section>
- defines a section with a group
<ul>
,<ol>
, and<li>
- ul is an unordered list
- ol is an ordered list
- li defines a list item
<form>
- Defines an HTML form for user input
<input>
- defines an input control
- What is CSS?
- Cascading Style Sheets
- formats the layout of a page
- control color, font, position of elements etc.
- What is a CSS selector? How do you use the ID selector? The class selector?
- a pattern or patterns used to select the elements you want to be styled
- you can set a selector to an ID and call the ID for each element
- similar to ID but calls all elements in the class defined
- What are the three ways to include CSS in your HTML documents? What are the pros and cons of each?
- inline in attribute inside HTML element
- pro: customizable
- con: must repeat in every new line
- internal in a <style> element in the section
- pro: once set, everything follows
- con: must change if a different effect is desired
- external in an external CSS file
- pro: easy to manipulate
- con: dont lose that file!
- What is the Box Model? Describe each component of the Box Model.
- a model of the HTML setup
- includes:
- 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
- includes:
- What is a database?
- What is SQL?
- Structured Query language
- create, modify and delete tables
- SQL is a programming language
- What is SQLite3?
- A "lite" version of SQL
- good for experiementing but not used in actual production.
- What is a Table?
- a way to hold and display information that has different attributes such as an ID, name and quantity
-
What is a primary key?
-
What is a foreign key?
-
Explain what each of the following SQL commands do:
- insert
- inserts data into a table
- select
- finds data from a table
- where
- defines the type or characteritic of the data to be selected from the table
- order by
- will sort the table and the data within by given characterisic
- inner join
- joins two different tables together to create a new table with the specified attributes of each table
- How can you limit which columns you select from a table?
- specify the column in which you are trying to retreive information
- select (name of column),(name of compared column) from (directory)
- How can you limit which rows you select from a table?
- specify the criteria of which rows you want to retrieve
- select * from (directory) where (name of column) (criteria eg. cost > o)
- How can you give a selected column a different name in your output?
- How can you sort your output from a SQL statement?
- you can use the order by method and describe the criteria that meets the sort
- What is joining? When do you need to join?
- use the union method
- neccesary when finding and comparing data from different tables or trying to combine data from different tables
- What is an aggregate function?
- gives us the ability to retreive a single row of information
- such as the max value or most revent date etc.
- List three aggregate functions and what they do.
- max: give the highest value in the table
- latest: give the most recent item
- sum: give sum of all tables
- What does the
group
statement do?
- groups rows that have the values into a summary row
- How does the
group
statement relate to aggregates?
- it returns a single row like an aggregate
Copy and Paste the link to your Task Manager repo here: Task Manager Copy and Paste the link to your Static Challenge here: Static Challange
- Define CRUD.
- create recieve update and delete
- Define MVC.
- model view Controller
- What three files would you need to create/modify for a Rails application to respond to a
GET
request to/tasks
, assuming you have aTask
model.
- routes.rb
- views/tasks/index.html.erb
- controllers/task_controller.rb
- What are params? Where do they come from?
- parameters of user input. The come from and users inpuit into a text field
- Check out your routes. Why do we need two routes each for creating a new Task and editing an existing Task?
- One route is to create and the other is to overide and recreate for editing.