HTML Formatting and Styling

BrighterGuqin avatar
BrighterGuqin
·
·
Download

Start Quiz

Study Flashcards

40 Questions

What is the purpose of the 'name' attribute in a form?

To reference the form data after submission

Which HTML input type displays a color picker box?

color

What is the purpose of the element?

To create a dropdown list

What is the purpose of the element?

To create a multi-line input field

Which HTML input type displays a submit button?

submit

What is the purpose of the 'options' in a element?

To define the available options in a dropdown list

Which HTML input type displays a range bar?

range

Which HTML input type displays a checkbox?

checkbox

What is the purpose of the `` tag in HTML?

To separate content in an HTML page

What is the most important attribute of the <a> tag?

href

How are unvisited links displayed in a browser by default?

Underlined and blue

What is the purpose of the `` tag in HTML?

To create a scrollable text or image

What is the purpose of the <pre> tag in HTML?

To display text in a fixed-width font

What is the purpose of the behavior attribute in the `` tag?

To set how the text is scrolled within the marquee

What is the default color of an active link in a browser?

Red

What is the purpose of the align attribute in a heading tag?

To align text left, right, or center in a page

What is the purpose of the <a> tag in HTML?

To link from one page to another

What is the default font size of normal text in HTML?

16px

What is the purpose of the div tag in HTML?

To make divisions of content in the web page

What is the default behavior of the p tag in HTML?

It adds a single blank line before and after each element

What is the default direction of the scrolling within the marquee if no value is specified?

Left

What is the default number of times the marquee will scroll if no value is specified for the loop attribute?

-1

What is the font size of the `` tag in HTML?

32px

What is the default value of the scrollamount attribute in pixels?

6

What is the purpose of the tag in HTML?

To define a paragraph of text

What is the characteristic of the div tag in HTML?

It is a block-level tag that contains the entire width

What is the purpose of the alt attribute in the img tag?

To specify an alternate text for the image

What is the purpose of the controls attribute in the video tag?

To add video controls, like play, pause, and volume

What is the purpose of the tag in HTML?

To make divisions of content in the web page

What is the default behavior of the scrolldelay attribute if no value is specified?

It waits for 85 milliseconds

What is the purpose of the vspace attribute in the marquee tag?

To set the vertical margin in pixels or percentage value

What is the purpose of the hspace attribute in the marquee tag?

To set the horizontal margin in pixels or percentage value

What attribute is used to start a video automatically?

autoplay

What is the purpose of the controls attribute in the HTML audio element?

To add audio controls like play, pause, and volume

What is the use of the iframe element in HTML?

To embed Youtube videos and Google Maps

How do you embed a Youtube video in an iframe?

By using the share button and choosing the Embed option

What is the purpose of adding muted after autoplay in a video tag?

To start the video automatically but muted

What is the rule for browsers regarding autoplay in videos and audio files?

Browsers do not allow autoplay in most cases

What is the purpose of the text between the audio and audio tags?

To display the text in browsers that do not support the audio element

How do you embed a Google Map in an iframe?

By following the steps on the Google Maps website

Study Notes

HTML Basics

  • HTML tags are used to define the structure and content of a web page.
  • Tags usually come in pairs, with the opening tag preceding the content and the closing tag following the content.
  • The align attribute is used to specify the alignment of text within a page, with options including center, left, and right.

HTML Headings

  • HTML headings are defined using the to tags, with being the most important and being the least important.
  • The font size of headings decreases as the number increases.
  • The default font size for normal text is 16px, and the font sizes for headings are:
    • ``: 32px
    • ``: 24px
    • ``: 18px
    • ``: 16px
    • ``: 13px
    • ``: 10px

HTML Paragraphs

  • The <p> tag is used to define a paragraph.
  • Browsers automatically add a single blank line before and after each </p><p> element.

HTML Divisions

  • The </p><div> tag is used to divide content into sections.
  • The <div> tag is a block-level element, meaning it takes up the full width of the page.
  • The <div> tag is used to make divisions of content in the web page.

HTML Horizontal Rules

  • The `` tag is used to define a horizontal rule.
  • The `` tag is used to separate content in an HTML page.
  • The syntax for the `` tag includes width, height, and color attributes.
  • The <a> tag is used to define a hyperlink.
  • The most important attribute of the </a><a> element is the href attribute, which specifies the link's destination.
  • By default, links will appear as follows in all browsers:
    • Unvisited link: underlined and blue
    • Visited link: underlined and purple
    • Active link: underlined and red

HTML Marquees

  • The `` tag is used to create a scrolling text or image.
  • The syntax for the `` tag includes behavior, direction, loop, width, height, bgcolor, scrollamount, and scrolldelay attributes.

HTML Media

  • The `` tag is used to embed an image in an HTML page.
  • The `` tag has two required attributes: src and alt.
  • The `` tag is used to show a video on a web page.
  • The `` tag allows you to specify alternative video files, and the browser will use the first recognized format.
  • The `` tag is used to play an audio file on a web page.
  • The `` tag allows you to specify alternative audio files, and the browser will use the first recognized format.

HTML Iframes

  • The `` tag is used to embed a document or a webpage within another HTML document or webpage.
  • Iframes can be used to embed YouTube videos and Google Maps into a webpage.

HTML Input Types

  • The `` tag is used to create input fields for forms.
  • The type attribute specifies the type of input field.
  • The available input types are:
    • text: a single-line text input field
    • email: a field for entering an email address
    • password: a field for entering a password
    • radio: a radio button for selecting one option
    • checkbox: a checkbox for selecting zero or more options
    • submit: a submit button for submitting a form
    • button: a clickable button
    • reset: a reset button for resetting form controls
    • color: a color picker box
    • date: a date box
    • time: a time box
    • number: a number box
    • range: a range bar
    • file: a Choose File button

HTML Dropdowns

  • The `` tag is used to create a drop-down list.
  • The `` tag is used to define the available options in the drop-down list.
  • The name attribute is needed to reference the form data after the form is submitted.

HTML Textarea

  • The `` tag is used to create a multi-line input field.
  • The `` tag is often used in a form to collect user inputs like comments or reviews.

This quiz covers the basics of HTML formatting and styling, including syntax and tips for heading tags and font sizes.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

HTML Structure d'un document Quiz
16 questions
Understanding HTML Basics
10 questions
Use Quizgecko on...
Browser
Browser