HTML and CSS

Cards (58)

  • What is HTML used for?
    To set the structure of a web page
  • What is the purpose of CSS in web design?
    To format the web page's appearance
  • What tags indicate the start and end of an HTML document?
    <html> tags
  • What is the function of the <link> tag in HTML?
    To link to a CSS file
  • What does the <head> tag signify in an HTML document?
    Start and end of the head section
  • What is the purpose of the <title> tag?
    To give the title of the webpage
  • What does the <body> tag indicate?
    Where the main part of the web page begins
  • What are the <h1>, <h2>, and <h3> tags used for?
    To set headers of different sizes
  • How is an image placed in an HTML document?
    Using the <img> tag with properties
  • What properties are used with the <img> tag?
    src, alt, height, width
  • How would you write an <img> tag for a smiley face image?
    <img src="smiley.gif" alt="Smiley face" height="42" width="42">
  • What does the <a> tag create?
    A hyperlink
  • What property is used in the <a> tag to specify the link location?
    href property
  • How would you write a hyperlink to Ealing Independent College?
    <a href="https://www.ealingindependentcollege.com/">Visit the college!</a>
  • What is the purpose of the <div> tag?
    To divide a web page into sections
  • What does the <form> tag do?
    Formats a section as a form
  • What does the <p> tag indicate?
    A paragraph
  • What does the <li> tag indicate?
    An item on a list
  • How would you write list items for red, yellow, and blue?
    <li>red</li> <li>yellow</li> <li>blue</li>
  • What does the <ol> tag indicate?
    An ordered list
  • What does the <ul> tag indicate?
    An unordered list
  • How would you write an ordered list for red, yellow, and blue?
    1. red 2. yellow 3. blue
  • How would you write an unordered list for red, yellow, and blue?
    ● red ● yellowblue
  • What does the <input> tag do?
    Sets up input text boxes or buttons
  • What properties does the <input> tag contain?
    Type and name properties
  • How would you write an input for first name?
    <input type="text" name="first_name" value="" maxlength="100" />
  • How would you write an input for last name?
    <input type="text" name="last_name" value="" maxlength="100" />
  • What does the <script> tag contain?
    A section of Javascript
  • How can CSS be applied to a web page?
    To individual elements, identifiers, or classes
  • What is an element in CSS?
    A single part of a web page
  • How would you apply CSS directly to an <h1> element?
    <h1 style="color:blue;">Header</h1>
  • What are identifiers in CSS?
    Begin with # and apply formatting
  • How would you define an identifier in CSS?
    #para1 { text-align: center; color: red; }
  • How would you apply an identifier to a paragraph?
    <p id="para1">Hello World!</p>
  • What is the difference between an id and a class in CSS?
    Id is unique; class can be reused
  • How would you define a class in CSS?
    .center { text-align: center; color: red; }
  • How would you apply a class to an <h1> element?
    <h1 class="center">Heading</h1>
  • Where is the <link> tag placed in an HTML document?
    In the header of the HTML document
  • What does the <link> tag do?
    Tells the page where to find the CSS file
  • How would you write a <link> tag for a CSS file?
    <link href="mystylesheet.css" rel="stylesheet">