HTML, CSS, and Bootstrap Flashcards

1
Q

What is HTML?

A
  • Hypertext Markup Language
  • Defines how a web page is laid out.
  • Uses tags
  • Know the format of tags.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some common tags?

A
  • HTML
  • Head
  • Body
  • P (paragraph)
  • Div (Division)
  • Span
  • h1 - h6 (heading 1-6)
  • a (anchor)
  • Style
  • Script
  • Form
  • Ul (Unordered List)
  • Ol (Ordered List)
  • Dl (Description List)
  • Li (List)
  • Dt (Description term)
  • Dd (Definition description)
  • img (image) - etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the first tag in EVERY HTML file?

A
  • HTML

- DOCTYPE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is CSS?

A
  • Cascading style sheet

- Defines how the elements on the page will look.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HTML vs CSS

A
  • HTML defines the structure of a webpage while CSS defines the look
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the different forms of CSS?

A
  • External - In a separate file that is linked.
  • Internal - At the top of the document in style tags.
  • Inline - as an attribute on the elements themselves.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is iFrame?

A
  • An HTML document embedded inside another HTML document on a website.
  • The IFrame element is used to insert content from another source, like an ad on a
    web page.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is DOM?

A
  • Document Object Model
  • Represents the HTML page structure as nodes and objects. That way, programming
    languages can connect to the page.
  • Root node is the window object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Bootstrap?

A
  • A front-end, open source toolkit used to speed up development with HTML, CSS, and
    JavaScript.
  • Built for mobile first web-development, using a grid system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are Meta Tags?

A
  • Provide metadata about the HTML document.
  • Metadata will not be displayed on the page but will be machine parsable.
  • Meta elements are typically used to specify page description, keywords, author of the
    document, last modified, and other metadata.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is ASCII?

A
  • American Standard Code Information Interchange

- A character encoding standard for electric communication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is ANSI?

A
  • American National Standards Institute.
  • Creates standards for the computer industry.
  • Sets standards throughout a wide range of technical areas from electrical specifications
    to communication protocols.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is UTF-8?

A
  • Unicode Transformation Format
  • 8 means it uses 8-bit blocks to represent a character
  • A character encoding that can contain any Unicode characters.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What tag would you use to create tables?

A
  • T - table tag
  • Tr - is table row
  • Th - is table head
  • Td - is table data (column data)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What tag would you use to create list?

A
Ordered list
- Ol
- li
Unordered list
- Ul
- li
Description list
- Dl
- Dt
- Dd
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What tag would you use to create forms?

A
  • Form tag creates a form
  • Input specifies the different form inputs
  • Button or input type=”button” can be used to submit.
  • If there is only one button on the form it will default to the submit button.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does attribute “required” do?

A
  • Used on input to specify that it must be filled out for the form to submit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does attribute “target=”_blank”’ do?

A
  • Anchor links may have the target attribute which controls what happens when the anchor
    is Clicked.
  • If the target is _blank this tells the browser to open a new window (or tab depending on
    user settings) when the link is Clicked.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What tag do you use to create an image?

A
  • img
  • Requires a src attribute which is where the image is from
  • Also requires an alt attribute = specifies the alternate text for the image if it could not be
    loaded.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is JavaScript?

A
  • is an object oriented interpreted scripting language

- Used on web pages for DOM manipulation to make the pages more interactive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is AJAX?

A
  • Stands for Asynchronous JavaScript and XML.
  • A new technique for creating better, faster, and more interactive web applications
    using XML, HTML, CSS, and JavaScript.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is OBP?

A
  • Represents Object Based Programming.

- Basically, a superset of OOP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is DOM Manipulation?

A
  • The altering of the DOM while the application is running.
  • You can use this to add remove and change the way elements are laid out and how they
    look on the page.
24
Q

Is JavaScript loosely typed or strict typed?

A
  • JavaScript is loosely typed. You do not declare the data types of variables explicitly.
25
Q

What kind of compiler does JavaScript use/have?

A
  • JavaScript is interpreted not compiled
  • The script is interpreted by other applications like web-browsers or Node Packet
    Manager(npm).
26
Q

Is JavaScript case-sensitive?

A
  • Yes, JavaScript is case sensitive.
27
Q

What is Prototypical Inheritance?

A
  • Everything in JavaScript is an object
  • Each object has a private property which holds a link to another object called its
    prototype.
  • When you construct an object the prototype chain links all the way up to Object, the
    parent of everything in JavaScript to build the object.
28
Q

Is JavaScript Pass-By-Value or Pass-By-Reference?

A
  • For primitives JavaScript is pass by value.
  • JavaScript also uses call by sharing for objects.
  • Call by sharing is similar to pass by reference in that the function is able to modify the
    same mutable object but unlike pass by reference isn’t able to assign directly over it.
29
Q

What is Type Coercion?

A
  • Type coercion is a property of JavaScript to attempt to compare values of different
    types because it does not have strict types.
  • When == is done it will try to change the type of the object for a temporary comparison.
  • A good example is (1 == ‘1’ will be true, even though one is a string and one is a
    number).
  • This can be avoided by using === which will not try to do any casting.
30
Q

What are the variable scopes in JavaScript?

A
  • Global, local, and block scope
31
Q

What are functions in JavaScript?

A
  • Functions are objects to start.
  • A function object defines a series of tasks and/or calculates a value.
  • Must be defined in the scope you wish to call it in.
32
Q

What are the types of functions?

A
  • Function declaration - create a function but do not assign it to a variable.
  • Function expression - create a function and assign it to a variable.
33
Q

What is an anonymous function?

A
  • A function that is created at runtime.
  • The function operator can be used anywhere that it is valid to use an expression.
  • Called “anonymous” because the function was not “named”.
34
Q

What is a self-invoking function?

A
  • A self-invoking function is started automatically without being called; this is done right
    after it is created.
  • This is used for avoiding naming conflict as well as for achieving encapsulation.
  • Variables or declared objects are not accessible outside this function.
35
Q

What is Hoisting?

A
  • Hoisting in JavaScript is when the interpreter moves all variable and function
    declarations to the top of the current scope.
  • Only the declarations are hoisted, assignments are left where they are.
36
Q

What are Closures?

A
  • A closure is an inner function that has access to the outer functions’ variables.
  • A closure has three scope chains: its own scope, outer functions, and globals.
37
Q

JSON vs JS Object

A
  • JSON is JavaScript Object Notation
  • JSON is a data interchange format, a way to pass structured information between
    languages.
  • JSON is formatted similarly to how a JavaScript Object is formatted which makes it
    very easy to parse and build objects from.
38
Q

What does the keyword “STRICT” mean?

A
  • New as of ES5.
  • Is a literal expression indicates that the code should be executed in “strict mode”.
  • In strict mode you cannot do a lot of things that you can do outside of un-strict mode, for
    example using undeclared variables.
39
Q

What does it mean to be “Falsy”?

A
  • JavaScript does not use true and false when doing logical comparisons. JavaScript
    uses type coercion.
  • Truthy is not just the value true, it is a value that could logically represent a true
    value.
  • Truthy values could be true, empty object, empty array, empty function, positive
    numbers, and non-empty strings
  • Falsy values could be false, null, undefined, NaN, zero, and empty strings.
40
Q

What are the data types in JavaScript? (6)

A
  • String
  • Number
  • Boolean
  • Undefined
  • Arrays
  • Objects
  • Symbols
  • Function
41
Q

== vs ===

A
  • == uses type coercion meaning that it will try to see if they hold the same value by
    casting them to the same type, i.e. “1” = 1
  • === is a strict comparison – only true if the operands are of the same type and the
    contents match
42
Q

What is Bubbling?

A
  • Event bubbling is a form of event propagation.
  • Event bubbling propagates events from children to parents.
  • An event gets fired and is handled by a child element, from there it propagates up to
    parents with handlers for the event.
43
Q

What is Capturing?

A
  • Capturing is another form of event propagation.
  • Capturing works the opposite of bubbling:
  • When an event is fired, and parent and children elements have handlers registered
    the parent’s handler fires first and then the event trickles down to the child.
44
Q

Are JS objects mutable or immutable?

A
  • In JavaScript, only objects and arrays are mutable.

- Primitives are immutable.

45
Q

What are events?

A
  • HTML events are actions generated with user interaction with an element or
    elements.
  • Good examples are Click events on buttons, page loading, resizing the window, Clicking
    links, hovering, etc.
  • When a user does this with the mouse or keyboard the element can throw events to the
    JavaScript to work with or call predefined functions.
46
Q

What is a Listener?

A
  • A listener is an object that waits for events or actions to occur
  • In JavaScript the most used is the Event Listener, when an event occurs the element
    with an event listener attached will call or execute some type of function to make the web
    page more interactive.
47
Q

What are the JSON conversion types?

A
  • JSON to DataObject conversions:
  • String JSON can convert to string, long if long value, double if double value,
    boolean if true or false, date/datetime if is a date value.
  • Long to string, long, double, or date if value is a date.
  • Double to string, long if long value, double.
  • Boolean to string and boolean.
48
Q

What is HTTP?

A
  • HyperText Transfer Protocol.
  • The underlying protocol used by the world wide web.
  • Defines how messages are formatted and transmitted, and what actions servers
    and browsers should take in response to various commands.
49
Q

What are the Xml Http Request methods?

A
  • new XMLHttpRequest() - creates a new XMLHttpRequest object.
  • abort() - cancels the current request.
  • getAllResponseHeaders() - returns header information.
  • getResponseHeader() - returns specific header information.
  • open(method, url, async, user, psw) - specifies a request.
  • send()/send(string) - sends the request to the server.
  • setRequestHeader() - adds a label/value pair to the header to be sent.
50
Q

What are the Ready States in HTTP?

A
  • 0: request not initialized
  • 1: server connection established
  • 2: request received
  • 3: processing request
  • 4: request finished, and response is ready
51
Q

What are the HTTP Methods?

A
  • GET - requests a representation of the specified resource. Get should only be used
    to get data.
  • HEAD - asks for a response identical to that of a GET request, but without the
    response body.
  • POST - used to submit an entity to the specified resource, often causing a change in
    state or side effects on the server.
  • PUT - replaces all current representations of the target resource with the request
    payload.
  • DELETE - deletes the specified resource.
  • CONNECT - establishes a tunnel to the server identified by the target resource.
  • OPTIONS - used to describe the communication options for the target resource.
  • TRACE - performs a message loop-back test along the path to the target resource.
  • PATCH - used to apply partial modifications to a resource.
52
Q

What are the HTTP Statuses?

A
  • 100 - info.
  • 200 - success.
  • 300 - redirect.
  • 400 - bad request.
  • 500 - server error.
53
Q

What is a Callback Function?

A
  • A callback function is a function placed into a parameter of another function to make
    sure that certain steps are done when that function ends.
54
Q

What is the AJAX workflow?

A
  • An event in our browser occurs and a new XML/HTTPRequest is created
  • The request is opened and sent
  • Receives our request and processes it
  • Create a response and return it to our Client
  • Browser processes response and updates the webpage
55
Q

GET vs POST

A
  • GET requests can be cached.
  • GET requests remain in the browser history.
  • GET requests can be bookmarked.
  • GET requests should never be used when dealing with sensitive data.
  • GET requests have length restrictions.
  • GET requests should be used only to retrieve data.
  • POST requests are never cached.
  • POST requests do not remain in the browser history.
  • POST requests cannot be bookmarked.
  • POST requests have no restrictions on data length.
  • POST is NOT idempotent. So, if you retry the request N times, you will end up having N
    resources with N different URIs created on server.
  • PUT method is idempotent. So if you send retry a request multiple times, that should be
    equivalent to single request modification.
  • Idempotent - method can be called many times without different outcome.