HTML and CSS Basics
8 Questions
4 Views

HTML and CSS Basics

Created by
@BreathtakingSphene

Questions and Answers

What does the CSS property 'font-size' specifically control?

  • The size of the border
  • The size of the text (correct)
  • The size of the background color
  • The size of the element itself
  • Which attribute is NOT associated with the HTML image tag?

  • Border
  • Align
  • Src
  • Text-fill (correct)
  • Which of the following properties is used to change the horizontal alignment of text in CSS?

  • align-text
  • horizontal-align
  • text-position
  • text-align (correct)
  • What does the 'background-color' property affect in an HTML element?

    <p>The background color</p> Signup and view all the answers

    Which tag should you use to highlight text with a typical yellow background in HTML?

    <mark> Signup and view all the answers

    What role does the 'font-family' property serve in CSS?

    <p>Specifies the font to be used</p> Signup and view all the answers

    Which of the following elements cannot style text without using CSS?

    <div> Signup and view all the answers

    Which of the following correctly describes the purpose of the border property when used with images?

    <p>To add border styles like solid or double to an image</p> Signup and view all the answers

    Study Notes

    HTML and CSS Basics

    • The style attribute in HTML is essential for adding inline styles like color, font, and size to elements.
    • The background-color property in CSS sets the background color of an HTML element.
    • The color property in CSS defines the text color of an HTML element.
    • The font-family property specifies the type of font to be used for text in an HTML element.
    • The font-size property determines the size of the text in an HTML element.
    • The text-align property establishes the horizontal alignment of text within an HTML element.

    HTML Formatting Tags

    • HTML allows for text formatting without relying solely on CSS, offering a variety of formatting tags.
    • Common formatting tags include those that make text bold (like <strong>), italicized (like <em>), or underlined (like <u>).
    • To highlight text, the <mark> tag can be utilized, which displays text with a default yellow background.

    Image Handling in HTML

    • The <img> tag is utilized to embed images into a web page.
    • Key attributes of the <img> tag include:
      • src: indicates the image's file path.
      • align: determines image alignment (left or right) relative to surrounding text.
      • width: specifies the image's width.
      • height: indicates the image's height.
    • The border property can be applied to images to create borders, available in styles such as solid or double.

    Studying That Suits You

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

    Quiz Team

    Description

    This quiz covers the fundamental concepts of HTML and CSS, including how to apply inline styles and utilize formatting tags. It also addresses image handling and important CSS properties such as background color and font specifications. Test your basic knowledge of web development with this quiz!

    More Quizzes Like This

    Understanding HTML Basics Quiz
    10 questions
    CSS Syntax and HTML Basics
    6 questions
    Web Development Basics
    9 questions

    Web Development Basics

    WellMadeBaritoneSaxophone avatar
    WellMadeBaritoneSaxophone
    Use Quizgecko on...
    Browser
    Browser