HTML, CSS and Web Development

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Consider the basic structure of an HTML table. What is the correct and semantic order for the primary table tags to define the structure, assuming you have table rows and data?

  • ``, `<td>`, `<tr>`
  • ``, `<tr>`, `<td>` (correct)
  • `<tr>`, `<td>`, ``
  • ``, `<tr>`, `<th>`

What primary step is essential to make a webpage accessible to others on the internet?

  • Naming the main webpage file 'index.html'.
  • Implementing CSS for styling and layout.
  • Ensuring the page strictly adheres to W3C's XHTML validation standards.
  • Registering the webpage's URL with Google Search Console.
  • Transferring the webpage files to a publicly accessible web server. (correct)

When constructing a URL with a query string, which character is used to delineate the base URL from the parameters being passed?

  • &
  • =
  • +
  • //
  • ? (correct)

In HTML, what is the primary purpose of the <th> element within a table?

<p>To define a header cell within a table, typically for column or row headings. (C)</p>
Signup and view all the answers

You want to apply the same CSS rules to both <h1> and <h2> elements. Which CSS selector correctly achieves this?

<p><code>h1, h2</code> (D)</p>
Signup and view all the answers

Which CSS selector is used to target an HTML element based on the value of its id attribute?

<p><code>#</code> (C)</p>
Signup and view all the answers

In CSS, which unit is considered a relative unit, scaling based on the computed font size of the element itself or its parent?

<p><code>em</code> (C)</p>
Signup and view all the answers

When creating a valid HTML5 document, which of the following tags is NOT strictly required for the document to be considered valid?

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

Which property is NOT a component of the CSS box model, which defines how elements are rendered on a webpage?

<p>background color (B)</p>
Signup and view all the answers

What is the correct value for the box-sizing CSS property to ensure that the total width and height of an element include its padding and border?

<p><code>border-box</code> (A)</p>
Signup and view all the answers

True or False: The <article> tag is a semantic element introduced in HTML5 that represents a self-contained composition in a document, page, application, or site.

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

True or False: The title attribute of the <video> tag is primarily used to provide fallback content for browsers that do not support video playback.

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

True or False: The id attribute can be used multiple times within a single HTML document to style or script elements that share similar characteristics.

<p>False (B)</p>
Signup and view all the answers

True or False: Applying float: left; to a CSS element positions that element absolutely within its containing block.

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

True or False: In CSS, selectors with higher specificity will override styles defined by selectors with lower specificity when both apply to the same element.

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

True or False: Using pixel (px) units for font sizing is generally recommended for creating fully responsive and scalable web designs that adapt well to different screen sizes and resolutions.

<p>False (B)</p>
Signup and view all the answers

True or False: When CSS styles are applied in different ways (inline, embedded, or external), inline CSS styles typically override both external and embedded styles due to their higher specificity.

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

True or False: The <span> element is inherently semantic and provides meaning about the content it surrounds without needing any additional attributes or context.

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

True or False: CSS styles can only be applied to HTML documents by linking to an external stylesheet file, and it's not possible to include CSS rules directly within the HTML file itself.

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

True or False: Using semantic HTML tags, such as <article>, <nav>, and <aside>, primarily helps with improving a website's accessibility for users with disabilities and its visibility to search engines.

<p>True (B)</p>
Signup and view all the answers

Flashcards

Table Tag Order

The correct order for table tags is

, ,
/.

Web Page Availability

To make a web page available, it must be transferred to a publicly accessible web server.

Query String Character

The question mark (?) character appends a query string to a URL.

Element Purpose

The

element is used to define table headers.

Signup and view all the flashcards

CSS for Multiple Elements

The correct way to apply CSS to both

and

elements is h1, h2.

Signup and view all the flashcards

CSS ID Selector

The '#' selector targets elements with a specific ID.

Signup and view all the flashcards

Relative Font Size Unit

The 'em' unit is relative to font size in CSS.

Signup and view all the flashcards

Optional HTML5 Tag

The

tag is NOT required in a valid HTML5 page.

Signup and view all the flashcards

Non-Box Model Property

Background color is not part of the CSS box model.

Signup and view all the flashcards

box-sizing Value

The proper value of box-sizing to include padding/border in width is border-box.

Signup and view all the flashcards

Semantic?

The

tag is a semantic element in HTML5.

Signup and view all the flashcards

<iframe> Title Attribute

The title attribute of <iframe> is used for tooltips.

Signup and view all the flashcards

id Attribute Uniqueness

The id attribute can only be used once per HTML document.

Signup and view all the flashcards

float Property Positioning

CSS float: left; does not position an element absolutely.

Signup and view all the flashcards

CSS Specificity

CSS selectors with higher specificity override less specific ones.

Signup and view all the flashcards

Responsive Font Sizing

Pixel (px) font sizing is not recommended for responsive design.

Signup and view all the flashcards

CSS Override Order

Inline CSS overrides external and embedded CSS.

Signup and view all the flashcards

Style Element Applies Styles Inline?

The style element applies styles inline, this is false, as it applies internal styles.

Signup and view all the flashcards

CSS Origin

CSS can be applied from an external stylesheet, or internally

Signup and view all the flashcards

Semantic Tag Benefits

Semantic tags help improve accessibility and make websites easier to discover via Search Engine Optimization, (SEO).

Signup and view all the flashcards

Study Notes

  • This summarizes multiple-choice and true/false questions related to HTML, CSS, and web development concepts.

HTML Table Tags Order

  • The proper sequence of table tags isn't provided in the questions.

Web Page Availability

  • To make a web page accessible globally, it needs to be transferred to a publicly accessible web server.

Query String Character

  • The question mark (?) character is used to append a query string to a URL.

<th> Element

  • The <th> element is used to define table headers.

CSS Application to h1 and h2

  • The correct way to apply CSS to both <h1> and <h2> elements is by using a comma: h1, h2.

ID Selector

  • The # selector targets elements with a specific ID.

CSS Font Size Unit

  • The em unit is relative to font size in CSS.

Not Required HTML5 Tag

  • The <meta> tag is not strictly required in a valid HTML5 page.

CSS Box Model

  • Background color is not technically part of the CSS box model. Padding, margin, and borders are.

Box Sizing Value

  • Using border-box as the value for box-sizing includes padding and border in an element's width.

<article> Semantic Element

  • The statement that the <article> tag is a semantic element introduced in HTML5 is correct.

<source> Title Attribute

  • The title attribute of <source> is not used for tooltips, it provides fallback content, so the statement is false.

ID Attribute Uniqueness

  • The id attribute cannot be used more than once per HTML document; it must be unique, thus the statement is false.

CSS float: left; Positioning

  • CSS float: left; does not position an element absolutely; it floats it to the left, therefore the statement is false.

CSS Specificity

  • CSS selectors with higher specificity do override less specific ones, which makes this statement true.

Pixel Font Sizing

  • Pixel (px) font sizing is not recommended for responsive design; using em or % is better, so that statement is false.

Inline CSS Override

  • Inline CSS does override external and embedded CSS, making the statement true.

<style> Element

  • The <style> element applies styles inline without meaning, is true.

CSS Application Limitations

  • CSS can be applied from an external stylesheet, inline, or embedded, therefore, the premise that CSS can only be applied from an external stylesheet is false.

Semantic Tags

  • Semantic tags help with accessibility and SEO, and the statement is true.

Studying That Suits You

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

Quiz Team

More Like This

Use Quizgecko on...
Browser
Browser