Skip to content

Instantly share code, notes, and snippets.

@danmoran-pro
Last active November 14, 2019 23:33
Show Gist options
  • Save danmoran-pro/5a5de80296e71c5fa2d416bc9786c252 to your computer and use it in GitHub Desktop.
Save danmoran-pro/5a5de80296e71c5fa2d416bc9786c252 to your computer and use it in GitHub Desktop.

HTML

  1. What is HTML?
  • The standard markup language for web pages.
  • Stand for Hypertext Markup Language
  1. What is an HTML element?
  • usally contains a start and end tag with content in between.
  • also it's everything from the start to the end tag.
  • Elements can also be nested.
  1. What is an HTML attribute?
  • Provides additonal information to the element.
  • Are specified in the start tag.
  • Usally come in name/value pairs.
  1. What is the difference between a class and an id? When would you use one vs. the other?
  • class attr: should be used to define equal styles for elements.
  • id attr: specifies a unique id for an HTML element
    • An HTML element can only have one unique id that belongs to that single element, while a class name can be used by multiple elements:
  1. What HTML would you write to create a form for a new dog with a "name" and an "age"?
  • Dog name:

  • Dog age:

  1. What are semantic tags? When would you use them over a div?
  • an elemner that clearly describes it;s content.
  1. Explain what each of the following HTML tags do and when you would use them:
  • <h1>, <h2>, etc.
  • These define heading. Use them from most important to least.(1 through 6)
  • <p>
  • Defines a paragraph. Use to indicate what is a paragraph.
  • <body>
  • This element defines the body, everythting that will be printed from HTML will be included in it.
  • <a> and the href attribute
    • This is how Hyperlinks are defined. When you need to click from on thing to the next.
  • <img> and the src attribute
    • This is the image tag. the scr attribute is where you would paste the link.
  • <div>
    • defines element that are used as a container for other elements and styling.
  • <section>
    • defines diffrent sections to a document.
    • Best used for when differentiating diffrent parts to a page.
  • <ul>, <ol>, and <li>
      • - used for creating unordered lists.
        1. - used for creating ordered lists.
        2. li is where the items you want listed are held.
    • <form>
    • Defines a form that can be used to collect and/or store user input
    • <input>
      • element allows users to input data.

    CSS

    1. What is CSS?
    • CSS: Cascading Style Sheet
    • Describes how HTML elements are to be displayed on screen, paper, or in other media.
    • can control the layout of multiple web pages all at once.
    • Is used to define styles for your web pages, designs, layouts for diffrent devices and screen sizes.
    1. What is a CSS selector? How do you use the ID selector? The class selector?
    • Are used to "find" or select the HTML elements you want to style.
    • ID selector uses "#"
    • class selector uses "."
    1. What are the three ways to include CSS in your HTML documents? What are the pros and cons of each?

      *Inline: using the style attribute in HTML elements.

      • pro: Best used for when making small changes.
      • con: Can become messy.

      *Internal: using a <style> element in the section.

      • pro: Is best used for when needing to make changes to one page
      • con: can make HTML page long. Needing to make changes to each page when implemented on multiple pages.

      *External: using an external CSS file.

      • pro: Smaller and cleaner HTML file.
      • con: Too many files can become overwhelming.
    2. What is the Box Model? Describe each component of the Box Model.

    SQL

    Jumpstart Lab Tutorial

    1. What is a database?
    • A collection of data that can be access electronically.
    1. What is SQL?
    • Structured Query Language.
    • It is how we interact with most databases. Data base management system.
    1. What is SQLite3?
    • A light version SQL, ideal for learning and experimenting, but not for production.
    1. What is a Table?
    • Set or rows and columns.
    1. What is a primary key?
    • A unique ID for a row of data.
    1. What is a foreign key?
    • is what we use to refrence a primary key in another table.
    1. Explain what each of the following SQL commands do:
    • insert - inserts new data into a database
    • select - extracts data from a database
    • where - searches for matching criteria
    • order by - sorts data
    • inner join - combines data from multiple tables where keys match.

    PG Exercises

    1. How can you limit which columns you select from a table?
    • After 'select' use the nmaes of columns you want to desire.
    1. How can you limit which rows you select from a table?
    • Using keyword 'where'the the rows that is desired.
    1. How can you give a selected column a different name in your output?
    • Using the keyword 'as'
    1. How can you sort your output from a SQL statement?
    • use 'order by' and then the column name
    1. What is joining? When do you need to join?
    • Joining combines tables that share unique IDs. It's an best used when the data we need lives in multiple tables.
    1. What is an aggregate function?
    • groups together and creates a single result from multiple rows elememnts to another row element.
    1. List three aggregate functions and what they do.
    • COUNT() counts the number of rows in a table.
    • SUM()- add together rows based on criteria.
    • MAX() - find the maximum value in the selection.
    1. What does the group statement do?
    • groups together the selection according to the values given.
    1. How does the group statement relate to aggregates?
    • returns the value of which rows/criteria and combines them together.

    Rails Tutorial: Task Manager

    copy and Pase the link to your repo here:https://github.com/danmoran-pro/task_manager

    Paste the link to your Static Challenge here: https://github.com/danmoran-pro/static_challenges

    1. Define CRUD.
    • C: Create
    • R: Read
    • U: Update
    • D: Delete
    1. Define MVC.
    • Model, View, Controller. Is the basic structure most web applications are based on.
    • Controller handles incoming request, Model the place where request are put together.View is the final product.
    1. What three files would you need to create/modify for a Rails application to respond to a GET request to /tasks, assuming you have a Task model.
    • view
    • controller -route
    1. What are params? Where do they come from?
    • Params come from the inputed information in broswer. They are formatted as hashes in Rails.
    1. Check out your routes. Why do we need two routes each for creating a new Task and editing an existing Task?
    • get/read information for task.
    • post/create the task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment