CCT260 Final Flashcards

(55 cards)

1
Q

Hypertext/Hyperlinks/Hypermedia

A

Hypertext is a form of electronic text document that uses links,
called Hyperlinks, to connect other documents from words or
phrases within a document. Hypermedia is the use of these
links for media like images, videos and audios.

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

First program to be recognized
as a Web Browser.

A

Mosaic (1992)

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

What is HTML

A

HTML stands for HyperText Markup Language

HTML is designed to describe text documents on the web

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

http://

A

HyperText Transfer Protocol provides a standard way of communication between servers and web clients, or browsers, to communicate and transfer
hypertext documents.

The Internet Protocol Suite is a set of communication protocols, including TCP (Transmission Control Protocol) which defines how data is formatted, addressed, transmitted and
routed.

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

Common HTML Tags

A
  • <p> - Paragraph
    </p>
  • <strong> - bold text</strong>
  • <em> - italic text</em>
  • <a href=“…”> - link to another page
  • <img src=“…”> - image
  • <head> - the header of your document
    </head>
  • <body> - the body of your document
    </body>
  • <ol>, <ul>, <li> - lists
    </li></ul></ol>
  • <br></br> - line break
  • <div> - division / section
    </div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Elements of HTML

A
  • Elements provide the structure of the HTML page.
  • They tell the browser how to read and interpret certain content based on what type it is.
  • Elements take the form of <tags>, which are enclosed within pointy brackets.</tags>
  • Most elements require an open tag <tag> and a closing tag </tag>, but not all of them
    do.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HTML Attributes

A
  • All HTML elements can have attributes.
  • Attributes provide additional information about an element.
  • Attributes are always specified in the start tag.
  • Attributes usually come in name/value pairs like: name=”value”.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Common HTML Attributes

A
  • Alt: Specifies an alternative text for an image, when the image cannot be displayed.
  • Disabled: Specifies that an input element should be disabled.
  • Href: Specifies the URL (web address) for a link.
  • Id: Specifies a unique id for an element.
  • src: Specifies the URL (web address) for an image.
  • Style: Specifies an inline CSS style for an element.
  • Title: Specifies extra information about an element.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Setting up HTML document

A

<!DOCTYPE html>

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

HTML comments

A

<!-- CONTENT -->

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

What is Semantic HTML

A
  • Semantic elements in HTML are tags that carry meaning about the structure and content of a webpage. ex. <nav>, <header>, <body>, <aside>, <main>, <article>, <section>, <footer>, etc
  • Unlike non-semantic elements
    like <div> and <span>, which provide no information about their content, semantic elements contribute to the
    document’s clarity and help both browsers and developers understand the purpose of each section.</span>

Why use Semantic HTML?
* Clarity and Readability
* Accessibility
* SEO (Search Engine Optimization)

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

Workflow - Best Practices

A

Use lowercase letters and no spaces.

You must save your HTML documents with the
“.html” extension for them to be recognizable.

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

Proper use of <div>

A

<div> is useful for grouping together a bunch of different HTML elements, and applying various CSS properties to them at one go.

It starts on a new line and takes up the entire width of the page.

<div>
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>
</div>

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

Proper use of <span></span>

A

<span> is an inline element used to target specific content in another element.</span>

<p>My mother has <span>blue</span> eyes.</p>

Note: Only the <span></span> enclosed part will be in blue color

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

What is CSS

A

Cascading Style Sheet (CSS) is a language that describes the style of an HTML document. This is a standard for styling pages on web which include layout,
design and overall presentation of web pages.

We are also able to easily separate the document content from the document
presentation.

It is read top to bottom, meaning changes at the bottom of the document can override those at the top.

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

Inline CSS vs CSS in the head vs External CSS

A

“Inline” CSS implies that CSS is applied directly within the HTML tag of the document, using an attribute within the tags called style.
ex. <h1 style="color:blue;font-family:Arial">Heading 1</h1>

External Stylesheet (recommended)
* The most preferred way of using CSS is by putting it in an entirely new document and linking to it in your <head> tag by declaring it.

In HTML

<head>
<link></link>
</head>

In CSS
h1 {
color: blue;
font-family: Arial;
}

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

Importing fonts in CSS

A

@font-face {
font-family: “customFont”;
src: url(../fonts/sampleFont.woff);
}

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

Class vs ID

A

id {

  • Class and id are attributes that you can add to almost any tag in
    order to give them certain qualities within the page.
  • You can also use class and id to target specific tags within a
    category and ignore others.

CLASS is one of the HTML attributes
- class makes it possible to define equal styles for elements with the same class name:

.class {
attribute: value;
}

ID’s also one of the HTML attributes.
- Id specifies a unique id for an HTML element (the value must be unique within the HTML
document).
- id is mostly used to point to a stylesheet, and by JavaScript (via HTML DOM) to manipulate the element with the specific id.

attribute: value;
}

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

CSS units

A

CSS has two types of lengths:
* Absolute (px, pt, cm, mm, etc.)
* Relative units (em, rem, vw, vh, vmin, vmax, %, etc.)

Default font-size is 16px or 1rem
* em – is relative to the parent element // e.g. if default is 16px, than 2.5 em is 40px (2.5 x
16 = 40px)
* rem – is relative to the root HTML element (<html>) // calculated the same as em
* Both can use decimal units – e.g. 2.5rem; 1.875em; 1.15rem etc.

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

CSS box model

A

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

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

CSS position types

A

Position: static;
- This is the default positioning, meaning all HTML elements are placed one below another on the page.

Position: relative;
- This allows us to offset an element to the left, right, bottom, or top of its
default positioning.

Position: fixed;
- This fixes an element in one position, even if the page is scrolled.

Position: absolute;
- This places an element in an absolute position on the page.

Position: sticky;
- This toggles between relative and fixed position depending on scroll position.

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

CSS display property

A

display: block
- A block element has some white space above and below it and does not tolerate any HTML elements next to it

display: inline
- An inline element has no line break before or after it, and it tolerates HTML elements next to it

display: inline-block
- An inline-block element is placed as an inline element (on the same line as adjacent content), but it behaves as a block element

23
Q

Leading/Kerning/Tracking

A

Leading: Space between baselines

Kerning: Spacing between letters on an individual level

Tracking: Spacing between letters as a whole

24
CSS line height
Line height can be set with: * Number * % * Length: px, pt, cm, etc. Recommended line height: * Body Text (Web/Print): 1.4 to 1.6 times font size (e.g., 16px font with 24px line height). * Headings/Display: 1.2 to 1.3 times font size; shorter lines need less. * Small Text (Captions/Footnotes): 1.8 times or more, as smaller text requires more vertical separation. * All Caps: 0.8 to 1 times font size, as caps take up more vertical space.
25
Jacob Nielsen's 10 heuristics
1. Visibility of System Status 2. Match between System and Real World 3. User Control and Freedom 4. Consistency and Standards 5. Error Prevention 6. Recognition over Recall 7. Flexibility and Efficiency 8. Aesthetic and Minimalist Design 9. Easy Understanding of Errors 10. Help and Documentation
26
What is Journey Mapping
A user journey map is a means of presenting and describing every important step of a complex experience in a single overview. It includes but is not limited to what the user is doing, thinking and feeling while also indicating the physical/technological infrastructure available. User journey maps are useful when designing complex experiences such as banking, healthcare or public transport.
27
Low fidelity vs Mid vs High
Low fidelity: the blueprint (layout and walls) - Speed: You want to generate 10 ideas in 10 minutes, not 1 idea in 10 hours. - Focus on Core Utility: Does the user actually need a button here? Is the navigation bar too crowded? - Stakeholder Alignment: It prevents clients/managers from saying, "I don’t like that shade of blue," and forces them to focus on "Is the 'Buy' button in the right place?" Medium fidelity: the framing & drywall (structure & spacing) - Information Architecture (IA): Determining exactly how much space content takes up. - Hierarchy: Using shades of grey to tell the user what to look at first (Dark grey = Important; Light grey = Secondary). - Flow Testing: You connect these screens to see if the user journey has dead ends. High fidelity: interior design (paint, furniture, and decoration) - Visual Identity: Applying the brand’s color palette, typography, and voice. - Emotional Connection: Using photography and illustration to make the user feel something (trust, excitement, calm). - Developer Handoff: Providing the exact hex codes, font sizes, and shadow values for coding.
28
What is UX
User experience (UX) design is the process of designing effective, efficient, highly usable, inclusive, and even delightful experiences for human beings. In the context of the field of UX design, this typically relates to digital product experiences—meaning mobile apps and websites. UX Principles * User-centered * Consistency * Hierarchy * Context * Accessibility * Usability
29
What is information architecture (IA)
* Art and science of organizing and labeling websites, intranets, online communities, and software to support usability and findability * Shows users the content you have and the actions they can perform and allows users to focus on their tasks * Searching, sorting, and filtering information * Good IA helps users navigate; bad IA shifts creates scenarios where users are finding their way around instead
30
Color contrast standards
* Text should have 4.5:1 contrast ratio (AA standard) * Large text (18pt bold / 24pt regular) requires 3:1 contrast ratio * Don’t use colour alone to convey meaning
31
Body text standards
* Minimum font size: 16px for body text * Line length: 45–75 characters per line * Use clear, legible fonts * Ensure line spacing ~1.5x font size
32
3 principles of responsive design
Fluid Grids (flexible widths, not fixed pixels) * Fluid grid replaces fixed dimensions with relative units ( %, em, rem, vw, vh ) so that elements resize in proportion to the viewport * Viewport = visible area on the screen of your device Flexible media (images that scale): * img, video { max-width: 100%; height: auto; } Ensures: * The media never exceeds the width of its container. * It keeps its aspect ratio intact as it shrinks. Media Queries (CSS rules that respond to screen width): * @media (min-width: 768px) { .sidebar { display: none; } .main { width: 100%; } }
33
What is responsive design
* Responsive design is a web design approach in which the interface adapts to the device’s layout to facilitate usability, navigation and information seeking. * Responsiveness allows the design to adjust automatically so there is consistency across devices (mobile, tablet, computer, even TVs) * Responsive design is standard best practice for modern web design and development.
34
Benefits of responsive design
* Reach a larger audience (mobile, table, desktop users) * Save time and development efforts (one codebase, not multiple sites) * Improve SEO (search engine optimization) // (Google favours mobile-friendly websites) * Ensure brand and design consistency
35
d i s p l a y : f l e x ;
Defines a flex container, it enables flex context for all it’s direct children
36
f l e x - d i r e c t i o n
Establishes main-axis of flex direction of items that are in a flex container. ex. flex-direction: row; (makes it flow right), row-reverse (flow left), column (flow down), column-reverse (flow up)
37
j u s t i f y - c o n t e n t
Defines the alignment along the main axis justify-content: flex-start; flex-end; center; space-between (places one at each end and spaces the rest evenly between them); space-around (margin around each piece of content); space-evenly (spacing is exactly equal)
38
f l e x :
Allows you to adjust the individual flex size of each item .container { display: flex; flex: 1 /* all items are equal */ flex: 2 /* will take twice as much space */ }
39
When to use flexbox vs CSS grid
Use Flexbox for the MICRO (Components): * Aligning a logo and links inside a navbar. * Centering an icon inside a button. Use CSS Grid for the MACRO (Architecture): * Placing the Header, Sidebar, Main Content, and Footer on the page. * Building complex photo galleries. * Fact: The best websites use both together! (A Grid layout that contains Flexbox components)
40
fr
Fractional unit, one piece of available space
41
minmax(250px, 1fr)
minmax() is a CSS function that sets a size range. * The Minimum (250px): The card is not allowed to get smaller than this. * The Maximum (1fr): If there is extra empty space on the screen, stretch the card (1 fraction) to fill it.
42
repeat( ) and auto-fit( )
* repeat() tells the grid to make multiple columns using the same rule. * auto-fit is the magic word. * It tells the browser: "Look at the width of the screen, look at the minmax size, and fit as many columns as you physically can on one row."
43
The magic line - no need for media queries
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
44
Quality vs Performance - Media
Quality – the image, video, or audio should look and sound as good as possible Performance – the file should load as fast possible, on any device, on any connection 3 constraints: 1. Bandwith – not everyone has fast internet * Google’s research shows that 53% of mobile users abandon a page that takes more than 3 seconds to load 2. Screen variation – from 4K to 360px budget android phones… 3. Render-blocking resources * Images and videos are amongst the heaviest resources, they can delay the entire rendering of a page
45
Raster vs Vector images
Raster: A raster image is a grid of pixels arranged in rows and columns. The image is defined by how many pixels it contains and what colour each pixel is. Zoom in far enough on any raster image and you will see the individual squares. Photographs are always raster. * Resolution is fixed at the moment of creation * Scaling up degrades quality (pixelation) * Formats: JPEG, PNG, WebP, GIF Vector: A vector image is stored as a set of mathematical instructions draw a circle here, a line there, fill this shape with this colour. The image is calculated fresh every time it is rendered, which means it can be scaled to any size with no loss of quality. * Resolution-independent — sharp at any size * Only works for graphics that can be described geometrically: logos, icons, illustrations * Cannot represent photographic detail * Format: SVG
46
JPEG
JPEG was designed specifically for photographs. It uses lossy compression — when you save a JPEG, the algorithm analyses the image and discards data that human vision is least likely to notice, particularly fine detail in areas of gradual colour change. The result is a dramatically smaller file at the cost of some quality, with the quality/size tradeoff controlled by an adjustable quality setting (typically 1–100). * Best for: photographs and any image with smooth colour gradients * Does not support transparency * Re-saving degrades quality each time (each save is a fresh round of lossy compression)
47
PNG
PNG uses lossless compression — every pixel is preserved exactly. This makes files larger than JPEG for photographs, but PNG has two advantages: it supports transparency (an alpha channel), and there is no quality degradation no matter how many times you save the file. For graphics with sharp edges, flat colours, or transparent backgrounds, PNG often produces better-looking results at smaller file sizes than JPEG. * Best for: logos, UI graphics, screenshots, anything with transparency * Significantly larger than JPEG for photographic content * Lossless — safe to use as a working format
48
SVG
SVG (Scalable Vector Graphics) is actually an XML-based file format — you can open an SVG in a text editor and read the code that describes the image. This makes it uniquely powerful for web use: you can embed SVG directly in HTML, style it with CSS, and animate it with JavaScript. * Infinitely scalable — perfect for retina / HiDPI displays * Tiny file sizes for simple graphics * Can be styled and animated * Use for: logos, icons, illustrations, charts, diagrams
49
WebP
WebP is Google's modern image format, designed as a direct successor to both JPEG and PNG. It supports both lossy and lossless compression, supports transparency, and in most cases produces files 25–35% smaller than the equivalent JPEG or PNG at comparable quality. Browser support is now excellent — all major browsers have supported WebP since 2020. For new projects, WebP should generally be your default raster format. * Best for: most web use cases where JPEG or PNG would previously have been used * Supports both transparency and lossy compression in a single format * Not always supported by older image editing tools when opening files
50
Containers vs Codecs
Container * Is the file wrapper, it holds the video/audio data, the subtitle tracker and the metadata, like a box (e.g. mp4 / webm) * It tells you nothing about the quality or efficiency of the video inside Codec * Is the compression algorithm that is used to encode the video data in the container * Determines the quality, file size, and compatibility * E.g. H.264 (AVC), H.265 (HEVC), VP9, and AV1 * MP4 + H.264 – the universal default // Excellent browser support. Use this when in doubt. * WebM + VP9 – more efficient than H.264 // Smaller files with comparable quality with excellent modern browser support, but not as universal. * WebM + AV1 – cutting edge choice with dramatically better compression, but encoding is slow and support is still growing
50
* controls – shows the browser’s default playback UI * autoplay – starts playing immediately // browsers block this unless muted is also set * muted – silences the audio // Required for autoplay to work * loop – replays the video when it ends * poster – a URL for a thumbnail image shown before the video plays * width / height – display dimensions (not the video’s native resolution)
51
Audio formats
* MP3 – safe default // supported everywhere // lossy compression but sounds excellent at 128 – 192 kbps * AAC – better quality than MP3 at the same file size // Native to Apple, and supported in all major browsers * OGG Vorbis – open source alternative // Excellent quality but not supported in Safari * WAV – uncompressed. Perfect quality with enormous file sizes. Only suitable for short sound effects
52
Self hosting vs Embedding AV
Self-hosting * Full control over the player, appearance, and autoplay behaviour * No third-party branding, recommended videos, or ads * Requires your server to handle bandwidth — can be expensive at scale * You are responsible for encoding and format compatibility Embedding (iframe) * Free, global CDN delivery — YouTube has enormous infrastructure * Automatic format selection and quality adaptation * Introduces third-party dependencies and tracking * Restricted control over player appearance and recommended content
52
When to use empty alt text
Decorative images, images that are purely aesthetic and convey no meaningful information, should have an empty alt attribute: alt = "". This tells screen readers to skip the element entirely, which reduces noise for users who rely on them. If you omit alt entirely, screen readers may read out the filename, which is confusing.