HTML review

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which syntax can we use to add comments to our HTML?

<!-- comment -->

What is the difference between the usage of <div> and <span>?

<div> is used for blocks, and <span> is used for a part of a line.

When should we use an ARIA attribute?

any time the existing markup makes things confusing in the accessibility tree

What are the four attributes we want to include on every img element?

src, alt, height, width

How can you mark a quotation as being in a different language from its surrounding text?

Create a <blockquote> element with a lang attribute indicating the language for its contents.

Which HTML elements are commonly used in marking up navigation?

<nav>, <ul>, <li>, <a>

Which type of element is typically a block?

<p>

Which type of tag would you not find in the document head?

<p>

In the tag below, what do we call "datetime"? <time datetime="2024-03-07"> March, 7, 2024</time>

an attribute

What's the difference between the value attribute and the placeholder attribute?

The value attribute fills the field with a value that will be submitted with the form. The placeholder shows a suggestion, but doesn't really enter it.

Which section of an HTML page should contain metadata?

the head

What's a true statement about the difference between the <blockquote> element and the <q> element?

<blockquote> is a block-level element, while the <q> element is inline, nested inside another block-level element.

What do you need to change to move from a resolution-based srcset to a width-based srcset?

Provide pixel measurements (w) instead of 1x, 2x, etc.

If you want to create a compact image that can display in large sizes without pixelation, which should you choose?

SVG

If you want to keep a caption with an image, which combination of elements lets you identify them as connected?

Surround the image with a figure element, and use the figcaption element inside of figure.

How does the id attribute differ from the class attribute?

An id attribute name may only be used once in a document.

Why should you use form elements instead of custom coding data inputs in JavaScript?

Why should you use form elements instead of custom coding data inputs in JavaScript?

what is &nbsp;

any time you want characters to appear as simple text instead of being parsed as code

You can add chapter divisions to videos by _____.

referencing a VTT file listing chapters

Why do you need to specify the desired language for HTML content?

so correct dictionaries and pronunciations are used

Where can you find the authoritative standard for HTML?

the living standard

What sort of efforts require the use and understanding of ARIA attributes?

those involving accessibility issues

Why should you spend effort optimizing image sources and corresponding display attributes?

to have the best compromise between image quality and download speed

How does a <label> element affect the type of the <input> element it contains?

It doesnt

When we want to convey importance, seriousness, or urgency, which element do we use?

<strong>

Which two elements are used to mark-up subscript and superscript text?

<sub> and <sup>

to show date and time

<time datetime="2025-10-08">October 8, 2025</time>

Which tag must you use within a video element to tell the player where to look for captions?

<track>

When used with the <input> tag , how is a placeholder attribute different from a value attribute?

A placeholder is a temporary suggestion of form, while a value is an estimate of the correct response

What do embedded YouTube videos, maps, and CodePen demos have in common?

All are services you can include in your own pages and sites with embed code based on the iframe element.

Which is the most powerful and fragile of the browser programming languages?

Javascript

What happens when HTML is broken because of a bug in the code?

The browser guesses what you meant, and does its best to fix the bug itself.

How does the browser know what information to present when it loads a web page?

The browser parses an HTML document, which may also include links to other resources, which the browser then downloads and presents.

What are the best uses for HTML's div and span elements?

To group elements, or mark text within an element.

What should you do to create an audio player with controls?

Use the audio element with the controls attribute set to yes.

How do you create a video element that specifies different resolutions of video that browsers can choose from when loading the video?

You can't do this. Instead, the browser adapts to circumstances as needed.

Which of these attributes is NOT a global attribute?

datetime

Why is web or browser programming broken up into three parts?

to be resilient to changes in technology

Why should you include the height and width specifications for all images?

to make the page layout more efficient

Which format is best suited to handle complex drawings and logos?

SVG

What are the six major sectioning elements that typically go directly in the <body> element?

<aside>, <main>, <article>, <header>, <footer>, <section>

Which tag preserves the spaces, tabs, and line breaks within a piece of text so a poem or piece of code can be presented faithfully?

<pre>

Why are tables the preferred option for creating layouts in HTML email?

because the other better options are not supported

How can you most easily change the appearance of an input form from that in the first image to that in the second image?

by adding CSS

How can you require a certain format for data entered into an input element?

by specifying the type attribute

When might we use a relative URL instead of an absolute URL?

when a website might be moved from a staging server to a production server

Which elements are used to convey meaning, instead of just typesetting convention?

<em> and <strong>

Which elements are used to mark-up code on screen?

<pre> and <code>

Which code would you use to guarantee that the words "Hocus Pocus" are not split by a line break after "Hocus"?

Hocus&nbsp;Pocus

Which is a true statement about HTML lists?

Lists can be used to mark up navigation.

What is the difference between a head element and a header element?

The head element contains document metadata, and a header element contains text to be displayed.

Why would you want to use the w specification in srcset instead of the x specification?

to consider both display density and window width when choosing the image source

What happens when you put a <label> element around an <input> element?

Clicking on the label activates that form field, and screen readers know that the label goes with the field.

What is the most effective way to use bandwidth efficiently when sending images?

Create a set of options the browser can choose from using the srcset attribute.


Ensembles d'études connexes

Psychology In Your Life; Chapter 11

View Set

Pain Management Ch 12: Max Injections

View Set

Talmud and Rabbinic Text Quiz Prep

View Set

ATI Fundamental Practice Questions pt.2

View Set

TOEFL Speaking Section (Type Question 1)

View Set

Chapter 9: Unemployment and Inflation

View Set

prepU ch 49 Drugs Used to Treat Anemias

View Set

HURST REVIEW - Fluid and Electrolytes

View Set