Git and HTML Basics
37 Questions
7 Views

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

What command would you use to see a description of available options for git reset?

  • git options reset
  • git -h reset
  • git reset help
  • git reset -h (correct)
  • What happens after you clone an existing git repository?

  • A new copy would overwrite the central repository
  • A copy of the repository would be created on the hosting platform
  • A copy of the repository would be created on your local machine (correct)
  • Nothing, cloning is not a supported git function
  • Which option can you use to apply git configurations across your entire git environment?

  • --master
  • --global (correct)
  • --all
  • --update
  • What does the command 'git commit -a -m "Refactor code base"' accomplish?

    <p>Adds all modified files to the staging area, then commits them with a message</p> Signup and view all the answers

    What will the following HTML code display in a browser? <h1>Hello</h1><p>World</p>

    <p>A large heading with 'World' in small letters beneath it.</p> Signup and view all the answers

    Which online service is commonly used for managing Git repositories?

    <p>GitHub, Bitbucket</p> Signup and view all the answers

    Which HTML attribute must be included in an input field to ensure it is required before form submission?

    <p>required</p> Signup and view all the answers

    Which tag is used to define a hyperlink in HTML?

    <a> Signup and view all the answers

    What is true of block and inline elements in HTML?

    <p>Block elements span the entire width of their container and inline elements are the same height and width as their content.</p> Signup and view all the answers

    When should you use the

      and
        elements in HTML?

    <p>Use <ol> for numbered lists and <ul> for bulleted lists</p> Signup and view all the answers

    Which attribute is used to specify the URL of the page that a link goes to?

    <p>href</p> Signup and view all the answers

    Which HTML tag is necessary for creating a drop-down list?

    <select> Signup and view all the answers

    Which HTML element is used for playing video files?

    <video> Signup and view all the answers

    Which attribute is used to ensure an HTML element is unique within the document?

    <p>id</p> Signup and view all the answers

    How can you specify a default value in a form input field?

    <p>value</p> Signup and view all the answers

    Which tag is used to display a horizontal line in HTML?

    <hr> Signup and view all the answers

    What is Test-Driven Development (TDD)?

    <p>A development approach where tests are written before the actual code</p> Signup and view all the answers

    What is the primary purpose of a unit test in TDD?

    <p>To focus on a specific function or piece of code</p> Signup and view all the answers

    Which of the following best describes the 'Red-Green-Refactor' cycle?

    <p>To ensure tests fail before new code is written</p> Signup and view all the answers

    Which of these is NOT one of the three main steps in the TDD cycle?

    <p>Write code, document processes, refactor</p> Signup and view all the answers

    How does TDD contribute to code quality and maintenance?

    <p>By ensuring that all tests are passing</p> Signup and view all the answers

    Which ordering correctly describes the types of CSS?

    <p>External, Embedded, Inline</p> Signup and view all the answers

    What is the purpose of the CSS property 'visibility: hidden;'?

    <p>It keeps the element in the document flow but hides it from view.</p> Signup and view all the answers

    What effect does the following CSS code have? h1 { text-align: center; }

    <p>It centers the text horizontally within the h1 element.</p> Signup and view all the answers

    Which property is responsible for controlling the space between the content and the border of an element?

    <p>padding</p> Signup and view all the answers

    What does the CSS rule body { line-height: 1.5; } achieve?

    <p>It sets the height of lines of text to be 1.5 times the font size.</p> Signup and view all the answers

    What will be the total width of an element with the following CSS applied? div { box-sizing: border-box; width: 200px; padding: 20px; border: 10px solid black; }

    <p>200px, including padding and border</p> Signup and view all the answers

    Which property is used to change the text color of an element?

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

    Which value can be used with the position property to fix an element to the top of the page while scrolling?

    <p>fixed</p> Signup and view all the answers

    Which CSS property is used to change the order of elements in a flex container?

    <p>order</p> Signup and view all the answers

    What does the following CSS code do when applied to an element? div { float: right; clear: both; }

    <p>It positions the element on the right and prevents it from floating.</p> Signup and view all the answers

    What is the purpose of the following CSS code? p { color: blue; }

    <p>It changes the text color of paragraphs to blue.</p> Signup and view all the answers

    What does the following CSS rule do? #main { width: 100%; }

    <p>It sets the width of the element with the id main to 100%.</p> Signup and view all the answers

    Which CSS property is used to add space between the border and content of an element?

    <p>padding</p> Signup and view all the answers

    What will happen when the following CSS code is applied? .container { display: flex; justify-content: space-between; }

    <p>The content inside .container will be aligned in a row and evenly spaced.</p> Signup and view all the answers

    Which CSS property is used to specify the type of bullet or marker for a list?

    <p>list-style-type</p> Signup and view all the answers

    What is the purpose of the following CSS code? img { border-radius: 50%; }

    <p>It creates a circular image.</p> Signup and view all the answers

    Study Notes

    Git Commands and Cloning

    • A git reset -h command will display help on the available git reset options.
    • Cloning an existing git repository creates a copy of that repository on your local machine, not on a hosting platform.

    Git Configuration

    • The --global option applies git configurations across the entire git environment.

    Git Commit

    • The command git commit -a -m "Refactor code base" adds all modified files to the staging area and then commits them with a message.

    Git Hosting Services

    • Two popular online hosting services for managing git repositories are Bitbucket and GitHub.

    HTML Background Color

    • The <body style="background-color:blue"> tag sets the background color of the HTML page to blue.
    • The <a href="url" target="_blank"> tag will open a link in a new tab.
    • The <img> tag is an example of an opening tag.

    HTML Form Attributes

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

    HTML Elements for Lists

    • Use <ul> when you need a bulleted list and <ol> for a numbered list.

    HTML Table Rows

    • The tag defines a table row in HTML.

    HTML Horizontal Line

    • The <hr> tag displays a horizontal line in HTML documents.

    HTML Largest Heading

    • The

      tag creates the largest heading.

    HTML Video Tag

    • The <video> tag is the appropriate HTML element for playing video files.

    HTML Unique Element

    • The id attribute is used to specify a unique element in an HTML document.

    HTML Default Input Value

    • The value attribute sets a default value in an input field.

    HTML Comments

    • <!-- This is a comment --> is the correct syntax for a comment in an HTML.
    • The <footer> tag is used to specify a footer for a document or section.

    CSS Positioning

    • The fixed value for position fixes an element to the top of the page when scrolling.

    CSS Line Height

    • The line-height property controls the space between lines of text. By default, line heights are 1.5 times the font size.

    CSS Border-Box Sizing

    • box-sizing: border-box; ensures that an element's width and height (including padding and border) will be equal to the width and height specified for the element.

    CSS Text Color

    • Use the color property to alter the color of text.

    CSS Class Usage

    • Multiple CSS classes can be used within a single HTML element.

    CSS Border Radius

    • border-radius: 50%; makes an image circular by creating a rounded corner for the image.

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Description

    Test your knowledge on Git commands, configurations, and HTML elements. This quiz covers fundamental concepts including cloning repositories, committing changes, and setting background colors in HTML. Perfect for beginners looking to solidify their understanding of web development.

    More Like This

    Use Quizgecko on...
    Browser
    Browser