Web Technologies Flashcards

1
Q

How do we access a webpage?

A

Connect to web via ISP (Internet Service Provider), comp contacts DNS (Domain Name System) servers, returns IP address, comp uses num provided by DNS to go to web server hosting website to visit, web server sends page to web browser.

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

What is HTML used for?

What is CSS used for?

A

HTML: Text, vid, tables, audio, links, forms, images + lists (STRUCTURE)
CSS: Presentation + layout

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

What are attributes?

A

Tell us more about elements e.g. <a> Attribute name is lang, attribute value is en-us. Require name + value.</a>

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

What is the structure of a webpage?

A

Head, including title, body, headings such as h1, h2 and main body, usually in paragraphs. Anything in body displayed on webpage. HTML pages are text docs, use tags/elements (containers), tell us about info between them, usually in pairs.

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

What is markup?

A

Creating a page, involving adding tags to content. 2 types, structural + semantic. Headings go from level 1 – 6. Whitespace is collapsed so only displays 1 normal space. Semantic markup is a set of elements which provides extra info about content, not used to alter presentation of elements differently.

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

What are the 3 types of lists?

A

Ordered (numbered), unordered (bullet point) & definition (define terms). Can be nested inside one another. <li> stands for list item.</li>

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

What is directory structure?

A

Root folder at top, each child folder which also has parent folder, may also have grandchild folders (esp. root folder) + so grandparent folder.
If linking to page within own site, use relative links rather than qualified URLs. Can use id attribute to target elements within a page that can be linked to.

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

How do forms work?

A

User fills in form + presses button to submit info to server, name of each form control sent with value user entered, server processes info using programming language, server creates new page to send back to browser based on info received.

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

How is info sent in forms?

A

Info from form sent in name/value pairs. Each form control given name + text user types in/values selected sent to server.

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

What is involved in CSS?

A

Selector (p) + declaration e.g. p {font-family: Arial;}. Associates style rules with HTML elements + affects how elements displayed. Treats each HTML element as if it appears inside own box, uses rules to indicate how it looks.

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

How do we display different colours in CSS?

A

Hexcode, colour name or RGB values for colours. CSS3: RGBA indicates opacity, also allows to specify colours with HSL values + optional opacity value (HSLA). A stands for alpha.

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

What are the different CSS selectors?

A

Universal (*{}), Type (h1, h2, h3{}), Class (.note{} p.note{}), ID (#introduction{})

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

Why would we use external CSS stylesheets?

A

Same CSS used for every page of website, don’t have to copy style code into each webpage, changes automatically applied, faster download for subsequent pages, easier to create new pages in same style.

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

Why does CSS having diff versions affect how it displays?

A

Some browser quirks/bugs as browsers don’t implement all features, older browsers don’t support each property.

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

How do rules work in CSS?

A

Made up of selectors (to specify which elements rule applies to) + declarations (to say appearance). Diff selectors allow targeting rules at diff elements. Declarations have 2 parts: properties of element changing + value of properties.

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

What are the previous versions of HTML?

A

First in 1990. HTML 2.0 was 1st to support GUI (1995).
3.2 introduced web forms + tables (1997). 4.01 added stylesheets & scripting technologies (1999). XHTML 1.0: XML is scripting lang, lets developers define own markup lang. (2000). 5.1 Follows XML rules, compatible with HTML, CSS + XHTML, logical layout elements, support for apps/rich media, removes HTML display elements in favour of CSS. (2016)

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

What are the rules of XML?

A

Every element in doc needed closing tag, element names lowercase, old elements not used, attribute values in quote marks, tags nested correctly + shouldn’t overlap.

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

What is the DOCTYPE variable for?

A

Tells browser how each page should be viewed. For HTML5, it’s . HTML comments appear inside . Escape characters: e.g. pound sign (£), copyright (©), trademark (™).

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

What is the HTML id/class attribute for?

A
Uniquely identifies 1 element within page, used by CSS &amp; JavaScript. E.g. <p>
Every element can also have class attribute, sev elements grouped under 1 class attribute. E.g. </p><p class="“red”">.</p>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the 2 categories of HTML elements?

A
Block level (starts on new line in browser window e.g. <p>) i.e. div tag, most useful for defining sections in webpage, each tag should have id/class to be unique. 
Inline level (continues on same line e.g. <b>) i.e. span tag allows elements to be differentiated, can be grouped, most useful with CSS.</b></p> div can create box.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is an iframe?

A

Cuts window into webpage, allows us to see other webpage behind it e.g. Google Map

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

What is metadata?

A

Stores info about webpages, lives inside . E.g. description (describe content), keywords (commonly used search words), robots (indicates whether search engines should add it to their search results), author, pragma (prevents caching) & expires (indicates when cached versions expire)

23
Q

What are some of the different typefaces?

A

Typeface Terms: Serif (Arial, Verdana, Helvetica), sans-serif (Georgia, Times, Times New Roman), monospace (Courier, Courier New), Cursive (Comic Sans MS, Monotype Corsiva), Fantasy (Impact, Haettenschweiler)

24
Q

What are some ways we can manipulate text using CSS?

A

Weights (light, medium, bold, black), styles (normal, italic, oblique), stretches (condensed, regular, extended). Type scales (developed in 1500s e.g. 12pt)

25
Q

What is true of font-face?

A

Must be supplied in several formats, fontsquirrel.com provides CSS rules + conversion, fonts subject to copyright + need appropriate license.

26
Q

What are the different attribute selectors?

A

Existence, equality, space, prefix, substring + suffix.

27
Q

What is alt for?

A

Provides text description of what shown in image. Must have by law.

28
Q

What is the action attribute for?

A

Allows us to specify URL data sent to.

29
Q

What does method attribute of form element needs when used for file upload box?

A

Post

30
Q

What does HTML5 placeholder attribute provide on text input?

A

Text to show until user clicks box.

31
Q

What are the rules for CSS rule application?

A

If 1 rule applied to multiple elements, use comma to separate. If multiple declaration, separate with semicolon.
To apply to <p> that follows </p><h1>: h1 + p { }
</h1>

32
Q

Describe the div tag’s use as a box.

A

It includes a min/max-width and min/max-height function, alongside text-align, margin, border + padding (out to in). Border has diff available styles: solid, dotted, dashed, double, groove, ridge, inset, outset. To centre div, must use margin inside of align feature. Can create diff shapes using border radius.

33
Q

Ordered List Styles

A

decimal, decimal-leading-zero, lower-alpha, upper-alpha, lower-roman, upper-roman.

34
Q

Unordered List Styles

A

none, disc, circle, square.

35
Q

Table Styling Elements

A

width, padding, text-transform, letter-spacing, font-size, border, text-align, background-color, :hover.

36
Q

Text Input Styling

A

font-size, color, background-color, border, border-radius, :focus, :hover, background-image, padding.

37
Q

Styling Submit Buttons

A

color, text-shadow, border-bottom, background-color, border-radius, :hover.

38
Q

Key concepts in positioning elements

A

Building blocks – bock level & inline. Normal flow, relative positioning, fixed positioning & absolute positioning.

39
Q

What are layout grids?

A

Long tradition of use in print design. Help make pages look professional, position items on page + set consistent proportions between items. Help create continuity between diff pages, new content, multiple designers + helps user predict where info will be on page.

40
Q

What are CSS Frameworks?

A

Provide CSS for common tasks, layout grids, styling forms + print-friendly pages. Saves repeating same code + has been tested across multiple browsers but often requires class names in HTML + to satisfy wide requirements will contained unused styles (bloat).

41
Q

What is a script?

A

Series of instructions comp follows to achieve goal. Define goal, design script, code steps. Comps create models of world using data. Objects in them use properties, events + methods. Can do diff things dep on what values has been passed.

42
Q

What are properties, events + methods?

A

Properties tell comp about object’s characteristics. Events tell comp how user interacts with object.
Methods tell comp how to change object’s properties.

43
Q

How do web browsers work?

A

Web browsers use models of browser window + webpages contained in them, use models to understand how to interpret webpages. Receives page, creates model + stores in memory, shows page using rendering engine. Web design works by progressive enhancement (content, presentation + behaviour).

44
Q

What are the comparison operators?

A

== (equal to), != (not equal to), === (strict equal to), !== (strict not equal to).

45
Q

What does the DOM do?

A

Specifies how browsers create a model of an HTML page + JS accesses/updates HTML page. There are element nodes, text nodes & attribute nodes. To access + update HTML, select elements you want to work with.

46
Q

How do DOM queries work?

A

Use DOM queries to select element nodes. DOM queries: getElementById(), getElementsByClassName(), getElementsByTagName(), querySelector(), querySelectorAll(). If DOM query returns multiple elements, it’s a NodeList, elements within these are numbered + selected like an array, can check if there are elements before using NodeList (if length >=1). Can move from 1 node to another if it’s a relation of it (traversing the DOM). parentNode, previousSibling, nextSibling, firstChild, lastChild. To access content, can use nodeValue on text nodes, textContent for text content of elements, innerHTML for text + markup. DOM Manip: createElement(), createTextNode(), appendChild(). Inner HTML: builds string, contains markup, updates elements.

47
Q

What are cross site scripting attacks?

A

XSS attacks. Untrusted data is content you don’t have complete control over, can contain malicious content. Sources: user creates profile, multiple contributors, data from 3rd party sites, files uploaded. Defence: Validate input sent to server, escape data coming from server.

48
Q

What are the timing event types?

A

Timing event types: setTimeout (function, milliseconds). setInterval (function, milliseconds).

49
Q

What is a session?

A

Temp + interactive info interchange between 2+ computing devices. More specifically, a page session lasts as long as browser is open + survives over page reloads + restores. In JS, sessionStorage property of Storage object can be used to store values (key value pairs). E.g. save data, get saved data, remove saved data. Opening a page in new tab/window creates new session. Opening multiple tabs with same URL creates sessionStorage for each tab. Closing a tab ends session + clears data. Relation: localStorage property which stores data with no expiration date, data not cleared when browser closed, data remains available until manually cleared, read only.

50
Q

What is cross site scripting?

A

Type of cyber attack which exposes security vulnerabilities in web applications. (Web app accepts user input, input used to create dynamic content, input insufficiently validated).

51
Q

Who is involved in cross site scripting?

A

An attacker (anon internet user/malicious internal user), company’s web server (external (shop, info, supplier) + internal (employees self service portal)) + client (customer, anon user accessing web server).

52
Q

What are scripting, cross-site and attack about?

A

Scripting: Web browsers can execute commands (embedded in HTML page, supports diff languages, most prominent is JS). Cross-site: Foreign script sent via server to client, attacker makes web server deliver malicious script code, malicious script executed in client’s web browser. Attack: Steal access credentials, denial of service, modify webpages, execute any command at client machine.

53
Q

What is XSS?

A

Old problem, first realised 20 years ago, now regularly listed on BUGTRAQ, many web apps affected. Insufficient IO checking. First target is client, client trusts server + browser executes malicious script. Company running server loses public image, customer trust + money. Ends with denial of service (client’s browser crashes, pop up flooding, redirection), access to user machine (ActiveX object controls machine, upload local data to attacker machine), spoil company’s image (load main frame content from other locations, redirect to dialer download).

54
Q

How can we avoid cross site scripting?

A

Use Whitelist texting, only pass what you expect to pass. Use regular expressions, HTML5 forms, don’t check for bad input, don’t use blacklist testing as these never complete. HMTL encoding transforms tags into plaintext so cannot run in browser, makes websites slower + not always possible e.g. when constructing URLs from input, meta refresh, generating JS from user input, when script enabled HTML tag attributes. Implement CSS-prevention in application, don’t assume input values are benign, don’t trust client side validation, check + validate all input before processing, don’t echo any input value without validation, use 1 conceptual solution in all apps.