{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Week 4 - HTML Flashcards

Content covered in Week 4 (95 cards)

1
Q

What is the main purpose of headings in an HTML document?

A

To define sections and provide structure, establish a content hierarchy, improve accessibility and user experience, and help search engines index content.

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

How many heading levels are there in HTML and what are they?

A

There are 6 heading levels: <h1> through <h6>. <h1> is the most important (main title), and <h6> is the least important.

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

What is the correct way to use heading levels in a document?

A

Follow a logical hierarchy: start with <h1>, then <h2>, <h3>, etc., without skipping levels (e.g., don’t jump from <h1> to <h4>).

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

Should headings be used to style text visually?

A

No. Headings should only reflect the structure and meaning of content, not be used just to style or resize text. Use CSS for styling.

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

What are the default font sizes for each HTML heading in most browsers?

A

<h1>: 32px

<h2>: 24px

<h3>: 18px

<h4>: 16px

<h5>: 14px

<h6>: 12px
</h6></h5></h4></h3></h2></h1>

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

Can the size of HTML headings be changed?

A

Yes, using CSS. But default sizes are consistent and reflect the importance of each heading level.

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

What kind of content can go between headings?

A

Text, images, links, and other HTML elements relevant to that section. This helps structure and categorize information clearly.

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

Why is heading hierarchy important for accessibility?

A

It allows screen readers and assistive technologies to understand the structure of the page, making it easier for users with disabilities to navigate.

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

How do headings affect SEO (Search Engine Optimization)?

A

Search engines use headings to understand the structure and main topics of a page, which can influence indexing and rankings.

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

Does a larger heading size mean more importance?

A

No. Importance is determined by heading level (<h1> to <h6>), not by visual size. Use headings semantically.

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

What does the <p> tag do in HTML?

A

It defines a paragraph, creating spacing before and after text. It’s a block-level element that takes up the full container width.

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

Name three inline tags used to style text and explain what they do.

A

<strong>: Makes text bold (used for importance).</strong>

<em>: Italicizes text (used for emphasis).</em>

<u>: Underlines text.</u>

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

What tags are used for superscript and subscript text? Give examples.

A

: Superscript (e.g., 1st)

: Subscript (e.g., H2O)

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

How can you show deleted and highlighted text?

A

<del>: Strikethrough (e.g., <del>$100</del>)</del>

<mark>: Highlight (e.g., <mark>Important</mark>)</mark>

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

What is the difference between <q> and <blockquote>?</q>

A

<q>: Short inline quotes (adds quotation marks automatically).</q>

<blockquote>: Long block quotes, usually indented.
</blockquote>

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

How do <cite>, cite attribute, and <footer> support quotes?</cite>

A

<cite>: Titles or sources of creative works.</cite>

cite attribute: Adds a URL source to quotes.

<footer>: Gives credit or attribution for a quote or section.
</footer>

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

What do <br></br> and <hr> do?

A

<br></br>: Inserts a line break.

<hr></hr>

: Adds a horizontal line for section separation.

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

When should you use <code> and <pre>?</code>

A

<code>: For inline code (monospaced font).</code>

<pre>: For preformatted text that preserves spaces and line breaks.
</pre>

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

What are the three types of lists in HTML?

A

<ul>: Unordered list (bullets).

<ol>: Ordered list (numbers).

<dl>: Definition list with <dt> (term) and <dd> (definition).
</dd></dt></dl></ol></ul>

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

What are nested lists, and why are they used?

A

Lists inside other lists; used to show hierarchy (e.g., substeps in a recipe).

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

What are the basic elements of an HTML table?

A

<table>: The table container.

<tr>: Table row.

<td>: Table data/cell.

<th>: Table header (bold, centered by default).
</th></td></tr></table>

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

How do colspan and rowspan work in tables?

A

colspan: Merges cells across columns.

rowspan: Merges cells across rows.

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

What are semantic elements in tables and why use them?

A

<thead>, <tbody>, <tfoot>: Group parts of a table for clarity and accessibility.
Improves structure and screen reader navigation.
</tfoot></tbody></thead>

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

Why are table attributes like border and align considered outdated?

A

They’re mostly deprecated in HTML5. Use CSS instead for styling.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the main attributes of the tag?
src: Image URL alt: Text if image fails to load or for screen readers width & height: Size control
26
Compare common image formats and when to use them.
JPEG: Best for photos PNG: Transparency, graphics GIF: Animations SVG: Scalable vector graphics WebP: Smaller, high-quality (check support)
27
What is the difference between relative and absolute image paths?
Relative: File within your project folder Absolute: Full URL to a hosted image
28
What does srcset do in responsive images?
Provides multiple versions of an image for different screen sizes and resolutions.
29
What tag is used for hyperlinks and what attribute specifies the URL?
30
List different types of links in HTML.
Internal External Anchor (to same page sections) Email (mailto:) Telephone (tel:)
31
What does target="_blank" do in a link?
Opens the linked page in a new tab.
32
Name a few helpful link attributes.
download: Forces file download rel: Defines relationship title: Tooltip on hover
33
How do you embed videos and audio in HTML?
Use
34
What are common video and audio file formats?
Video: MP4, WebM Audio: MP3, Ogg
35
What are codecs and why do they matter?
They compress/decompress media. Common ones: H.264 (video), MP3/AAC (audio).
36
How can videos be made responsive?
Use media attribute in , the poster image for previews, and CSS media queries.
37
Why is testing media across devices and browsers important?
To ensure compatibility, smooth playback, and accessibility for all users.
38
What is the purpose of an HTML form?
To collect user input and interact with the webpage.
39
Name common uses of HTML forms.
Login, sign-up, contact forms, surveys, newsletter subscriptions, payments, PDF generation.
40
What does the
element do?
It defines the form and contains all the input elements.
41
What does the action attribute in a form do?
Specifies the URL where the form data should be sent.
42
What does the method attribute specify?
The HTTP method used to send form data (GET or POST).
43
Difference between GET and POST methods?
GET sends data in the URL (less secure), POST sends data in the request body (more secure).
44
What does the element do?
Creates fields for user input.
45
List 5 common type attributes used with
text, email, number, password, checkbox.
46
What does the name attribute do in an input field?
Identifies the data for server-side processing.
47
What does the required attribute do?
Ensures a field must be filled before submission.
48
What is the purpose of the
Provides accessible text for an input field.
49
What does