HTML and CSS Fundamentals

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Given how browsers interpret HTML, what is the primary function of the <canvas> element?

  • To facilitate video playback within a webpage.
  • To incorporate animations without the need for external libraries.
  • To enable embedding of static images directly into the HTML.
  • To provide a dynamic surface for rendering graphics using JavaScript. (correct)

When creating a form, which attribute ensures that a specific input field is always completed before the form can be submitted?

  • `required` (correct)
  • `mandatory`
  • `checked`
  • `validate`

Which HTML tag is the most appropriate for embedding audio files into a webpage?

  • `<sound>`
  • `<mp3>`
  • `<audio>` (correct)
  • `<music>`

Which of the following HTML elements is self-closing?

<p><code>&lt;input&gt;</code> (C)</p> Signup and view all the answers

Suppose you want to ensure that a link opens in a new browser tab. Which attribute should you use within the <a> tag?

<p><code>target=&quot;_blank&quot;</code> (D)</p> Signup and view all the answers

If you're using CSS to apply two background images to a single element, which syntax is correct?

<p><code>background-image: url(image1.jpg), url(image2.jpg);</code> (D)</p> Signup and view all the answers

You need to make an element invisible on a webpage, but it should still occupy its original space. Which CSS property should you use?

<p><code>visibility: hidden;</code> (C)</p> Signup and view all the answers

In JavaScript, what will console.log(2 == "2") output?

<p><code>true</code> (A)</p> Signup and view all the answers

In JavaScript, you have an array and need to create a new array where each element has been modified. Which method is the best choice?

<p>Filters elements in an array (B)</p> Signup and view all the answers

In JavaScript, what is the correct function to use in order to introduce a delay before executing a given function?

<p><code>wait()</code> (D)</p> Signup and view all the answers

Flashcards

What does HTML stand for?

Hyper Text Markup Language, the standard language for creating web pages.

Line break tag

The <br> tag inserts a single line break.

target="_blank"

Opens a link in a new tab or window.

Important Text Element

The <strong> element defines important text, usually displayed in bold.

Signup and view all the flashcards

Invalid HTML5 Tag

is not a valid HTML5 tag.

Signup and view all the flashcards

Table Header Tag

The <th> tag is used to create a table header cell.

Signup and view all the flashcards

element usage

The <canvas> element renders graphics on the fly using JavaScript.

Signup and view all the flashcards

"required" attribute

The 'required' attribute specifies that an input field must be filled out before submitting the form

Signup and view all the flashcards

The <audio> tag is used to embed sound content in HTML.

Signup and view all the flashcards

Self-closing tag example

The <input> tag is a self-closing tag.

Signup and view all the flashcards

Study Notes

HTML Questions

  • HTML stands for Hyper Text Markup Language
  • The <br> tag inserts a line break.
  • target="_blank" opens a link in a new tab.
  • The <b> element defines important text.
  • <blink> is not a valid HTML5 tag.
  • The <thead> tag creates a table header.
  • The <canvas> element renders graphics via JavaScript.
  • The required attribute specifies a required input field.
  • The <audio> tag embeds audio files.
  • The <input> element represents a self-closing tag.

CSS Questions

  • font-family changes the font.
  • background-size: cover; makes a background image cover the entire container.
  • margin controls the space between elements.
  • background-image: url(image1.jpg), url(image2.jpg); applies multiple background images.
  • visibility: hidden; makes an element disappear but still occupy space.
  • The default position property of an HTML element is static.
  • :hover applies styles when a user hovers over an element.
  • grid allows elements to be arranged in a grid layout.
  • order changes the order of items in a flex container.
  • z-index controls the stacking order of elements.

JavaScript Questions

  • _variableName is a valid JavaScript variable name.
  • splice() removes an element from an array by index.
  • typeof NaN returns "number".
  • JSON.parse() converts a JSON string into a JavaScript object.
  • console.log(2 == "2") returns true.
  • setTimeout() delays execution of a JavaScript function.
  • ?. is used for optional chaining in JavaScript.
  • map() creates a new array with modified elements.
  • async handles asynchronous operations.
  • indexOf() finds the index of an element in an array.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser