Git and HTML Basics
37 Questions
8 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 (C)</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. (C)</p> Signup and view all the answers

Which online service is commonly used for managing Git repositories?

<p>GitHub, Bitbucket (B)</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 (D)</p> Signup and view all the answers

Which tag is used to define a hyperlink in HTML?

<p><a> (D)</p> 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. (B)</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 (C)</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 (D)</p> Signup and view all the answers

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

<p><select> (D)</p> Signup and view all the answers

Which HTML element is used for playing video files?

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

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

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

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

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

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

<hr> (A) Signup and view all the answers

What is Test-Driven Development (TDD)?

<p>A development approach where tests are written before the actual code (D)</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 (D)</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 (A)</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 (D)</p> Signup and view all the answers

How does TDD contribute to code quality and maintenance?

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

Which ordering correctly describes the types of CSS?

<p>External, Embedded, Inline (C)</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. (C)</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. (A)</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 (D)</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. (D)</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 (A)</p> Signup and view all the answers

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

<p>color (C)</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 (A)</p> Signup and view all the answers

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

<p>order (C)</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. (B)</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. (A)</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%. (D)</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 (D)</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. (C)</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 (B)</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. (C)</p> Signup and view all the answers

Flashcards

What command shows git reset options?

The git reset -h command displays a description of all available options for the git reset command.

What does git clone do?

Cloning a Git repository creates a complete copy of the repository on your local machine, allowing you to work on it independently.

How to apply Git config globally?

The --global option applies Git configurations to your entire Git environment, affecting all repositories you use.

What does git commit -a -m "Message" do?

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

Signup and view all the flashcards

Name two popular Git hosting services

GitHub and Bitbucket are popular online hosting services that provide features for version control, collaboration, and code management using Git.

Signup and view all the flashcards

How to add background color in HTML?

The background-color: CSS property is used to set the background color of an HTML element.

Signup and view all the flashcards

What's a closing tag in HTML?

The opening tag in HTML is the start of a specific element, while the closing tag marks the end of the element.

Signup and view all the flashcards

How to open a link in a new tab?

The target="_blank" attribute in an <a> tag opens the link in a new tab or window.

Signup and view all the flashcards

Inline CSS

Inline CSS is applied directly to an HTML element using the style attribute. It has the highest priority but is less maintainable, as it's embedded within the HTML structure.

Signup and view all the flashcards

Embedded CSS

Embedded CSS is placed within a <style> tag within the HTML document. It allows for styling a single page and has a higher precedence than external stylesheets.

Signup and view all the flashcards

External CSS

External CSS is a separate file (.css) linked to the HTML document using the tag. It's considered the best practice for organization and reusability.

Signup and view all the flashcards

Hidden Element (CSS)

The visibility: hidden; property hides the element from view but still occupies space on the page. Other elements will flow around the hidden element.

Signup and view all the flashcards

Display: None

The display: none; property removes the element entirely from the page layout. It no longer occupies any space, and other elements will fill the gap.

Signup and view all the flashcards

Padding

The padding property controls the space between the content of an element and its border.

Signup and view all the flashcards

Margin

The margin property controls the space between the element's border and the surrounding elements.

Signup and view all the flashcards

Line Height

The line-height property sets the height of lines of text, influencing the spacing between lines.

Signup and view all the flashcards

What HTML tag creates a link?

The <a> tag is used to create a hyperlink in HTML. It allows users to navigate to a specific web page or resource. The href attribute within the <a> tag specifies the URL of the target destination.

Signup and view all the flashcards

What attribute defines a link's destination?

The href attribute is used within the <a> tag to specify the URL (Uniform Resource Locator) of the web page or resource that the link points to. It determines where the user will be directed when they click on the link.

Signup and view all the flashcards

What's the core difference between block and inline elements?

Block elements, like <p> (paragraph) and <h1> (heading), occupy the entire width of their container and automatically start on a new line. Inline elements, like <span> and <b>, only take up the space required by their content and appear on the same line as surrounding text.

Signup and view all the flashcards

How do you create a checkbox in HTML?

The <input type="checkbox"> tag is used to create a checkbox input element in HTML. Checkboxes allow users to select or deselect an option.

Signup and view all the flashcards

Which attribute ensures an element is unique on the page?

The id attribute in HTML is used to give an element a unique identifier. This identifier can be used to style the element or interact with it using JavaScript.

Signup and view all the flashcards

How do you add a comment in HTML?

To add a comment to your HTML code, you can use the <!-- and --> tags. Comments are ignored by the web browser and are useful for adding notes or temporarily disabling code.

Signup and view all the flashcards

What tag specifies a footer for a document?

The <footer> tag is used to define a footer section in an HTML document. Footers typically contain information like copyright details, contact information, or links to other pages.

Signup and view all the flashcards

What defines a row in an HTML table?

The <tr> (table row) tag is used in HTML to define a row within a table structure. Each row contains one or more cells (<td>) that represent table data.

Signup and view all the flashcards

What is the CSS property for changing a cursor on hover?

It's a CSS property that adjusts a cursor's appearance when hovering over an element, changing the default arrow into an interactive pointer for user feedback.

Signup and view all the flashcards

What is Test-Driven Development (TDD)?

Test-Driven Development (TDD) is a software development approach where tests are written before writing any code. This forces developers to think about the desired functionality and its requirements upfront. It follows a cycle of writing tests, making the tests pass with code, and then refactoring the code while ensuring tests remain green.

Signup and view all the flashcards

What is a 'unit test' in the context of TDD?

A unit test in TDD focuses on testing a single component or function of your code in isolation. This granular approach allows you to pinpoint and fix issues easily.

Signup and view all the flashcards

What is the purpose of the "Red-Green-Refactor" cycle in TDD?

The "Red-Green-Refactor" cycle is the heart of TDD. It involves writing a test that fails (red), writing code to make the test pass (green), and then refactoring the code to improve its structure and clarity while ensuring the test remains passing. It's an iterative process.

Signup and view all the flashcards

What are the three main steps in the TDD cycle?

The three main steps in the TDD cycle are:

  1. Write tests: Write a test that's expected to fail.
  2. Write code: Implement the code to make the test pass.
  3. Refactor: Improve your code's structure and readability without changing its functionality, ensuring the tests still pass.
Signup and view all the flashcards

Flex Container Ordering

The order property in CSS is used to change the order of elements within a Flex container. It allows you to rearrange elements by assigning them numerical values, with lower values appearing earlier in the order.

Signup and view all the flashcards

Float and Clear in CSS

The float: right; CSS property positions an element to the right side of the container, while clear: both; prevents other floated elements from appearing next to it, ensuring a clean break.

Signup and view all the flashcards

Text Color in CSS

The color: blue; CSS property sets the text color of the specified element. You can use different color names or hexadecimal values to achieve various text colors.

Signup and view all the flashcards

Setting Element Width in CSS

The width: 100%; CSS property sets the width of the element with the ID main to occupy 100% of its parent container's width.

Signup and view all the flashcards

Padding in CSS

The padding property in CSS is used to add space between the content of an element and its border. This space is not part of the element's width or height.

Signup and view all the flashcards

Space-Between Flex Alignment

When display: flex; and justify-content: space-between; are applied to a container, the flex items (children of the container) are evenly spaced within the container, with the first and last items pushed to the edges.

Signup and view all the flashcards

List Markers in CSS

The list-style-type property in CSS is used to specify the type of bullet or marker for a list. This property determines how each list item is represented (e.g., bullet points, numbers, Roman numerals).

Signup and view all the flashcards

Multiple CSS Classes

Multiple CSS classes can be used within the same HTML element. This allows for applying multiple styles to an element, providing flexibility and complex styling options.

Signup and view all the flashcards

Rounded Corners and Circles in CSS

The border-radius property in CSS is used to create rounded corners for elements such as images. Setting it to 50% creates a circular shape.

Signup and view all the flashcards

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

Git Basics Quiz
10 questions
Git Commands Basics
16 questions

Git Commands Basics

CharmingLorentz avatar
CharmingLorentz
Use Quizgecko on...
Browser
Browser