Untitled Document (1) PDF - Practice Questions
Document Details
Uploaded by FearlessIndicolite1458
San Diego State University
Tags
Summary
This document contains a set of practice questions on web development topics, specifically focusing on git, HTML, and CSS. It includes multiple-choice questions and code snippets, making it a useful resource for students.
Full Transcript
Question 1 2 / 2 pts You want to perform a git reset but cannot recall all of the available options. What command would you use to see a description of them? git reset -h git reset help git options reset git -h reset Incorrect Question 2 0 / 2 pts...
Question 1 2 / 2 pts You want to perform a git reset but cannot recall all of the available options. What command would you use to see a description of them? git reset -h git reset help git options reset git -h reset Incorrect Question 2 0 / 2 pts If you cloned an existing git repository, what would happen? A copy of the repository would be created on the hosting platform Nothing, cloning is not a supported git function A copy of the repository would be created on your local machine A new copy would overwrite the central repository Incorrect Question 3 0 / 2 pts What option can you use to apply git configurations across your entire git environment? --master --global --all --update Question 4 2 / 2 pts After you make changes to a tracked file, you run the following command. What will this do? git commit -a -m "Refactor code base" Adds all new files to the staging area Commits all new files with a message Adds all modified files to the staging area, then commits them with a message Nothing, you can't use multiple options in the same command Incorrect Question 5 0 / 2 pts Talking about hosting services to manage Git repositories mention two popular online hosting services: Bitbucket, Git GitHub, Bitbucket Git, JIRA Git, GitHub Question 6 2 / 2 pts How do you add a background color in HTML? Incorrect Question 7 0 / 2 pts In HTML, is an example of _____. opening tag paragraph tag closing tag format tag Incorrect Question 8 0 / 2 pts How do you open a link in a new tab in HTML? Incorrect Question 9 0 / 2 pts Which HTML attribute specifies an input field must be filled out before submitting the form? mandatory mustfill validate required Question 10 2 / 2 pts When should you use and elements? Use when you want a bulleted list and when you want a numbered list. Use when you have a list of items in which the order of the items matters. Use when you have a list of items that could go in any order. Use when you want a bulleted list and when you want a numbered list. Use when you have a list of items in which the order of the items matters. Use when you have a list of items that could go in any order. Incorrect Question 11 0 / 2 pts Which tag is used to create a drop-down list in HTML? Question 12 2 / 2 pts What will this code display in a browser? Hello World A large heading with "World" in small letters beneath it. Two paragraphs, one with "Hello" and the other with "World." No content will be displayed. Only the text "Hello" will be visible. Incorrect Question 13 0 / 2 pts Which tag is used to define a hyperlink in HTML? Incorrect Question 14 0 / 2 pts What is true of block and inline elements? A element is an example of an inline element. is an example of a block element. By default, block elements span the entire width of its container; inline elements are the same height and width as the content contained between their tags. A is an example of a block element. is an example of an inline element. By default, block elements are the same height and width as the content container between their tags; inline elements span the entire width of its container. Question 15 2 / 2 pts Which tag is used to create a checkbox in HTML? Question 16 2 / 2 pts Which attribute is used to specify the URL of the page that the link goes to? url href link src Question 17 2 / 2 pts What is the correct syntax for specifying a title in a hyperlink? Question 18 2 / 2 pts What is the correct HTML element for playing video files? Question 19 2 / 2 pts Which attribute is used to specify that an element must be unique in the HTML document? key name id class Incorrect Question 20 0 / 2 pts How can you specify a default value in a form input field? input-value default placeholder value Question 21 2 / 2 pts How do you specify a comment in HTML? ** This is a comment ** // This is a comment Question 22 2 / 2 pts Which HTML tag is used for specifying a footer for a document or section? Question 23 2 / 2 pts Which tag is used to define a table row? Incorrect Question 24 0 / 2 pts Which tag is used to display a horizontal line in HTML? Question 25 2 / 2 pts What is the correct HTML element for the largest heading? Question 26 2 / 2 pts Discussing Cascading Style Sheets (CSS) look at the following code snippets and choose the appropriate ordering: h1 COMPE561 Inline, Embedded, External Embedded, Inline, External External, Embedded, Inline External, Inline, Embedded Incorrect Question 27 0 / 2 pts Which of the following CSS properties would hide an element from the page but still keep it in the document flow? span { ????; } overflow: hidden; visibility: hidden; opacity: 0; display: none; Incorrect Question 28 0 / 2 pts What will the following CSS code do? h1 { text-align: center; } It aligns the text to the left of the screen. It centers the text horizontally within the element. It centers the entire element on the page. It applies a bold font style to the text. Incorrect Question 29 0 / 2 pts Which CSS property is used to control the space between the content and border of an element? border-spacing padding spacing margin Question 30 2 / 2 pts What does the following CSS do? body { line-height: 1.5; } It sets the height of lines of text to be 1.5 times the font size. It doubles the height of the body element. It changes the font size to 1.5 times the normal size. It increases the space between letters. Incorrect Question 31 0 / 2 pts What will happen when the following CSS code is applied to an element? div { box-sizing: border-box; width: 200px; padding: 20px; border: 10px solid black; } The element's total width will be 260px. The element's total width will be 200px, including padding and border. The element's total width will be 240px. The element's total width will be 300px. Question 32 2 / 2 pts Which CSS property is used to change the text color of an element? style-color color text-color font-color Question 33 2 / 2 pts Which of the following values can be used with the position property to fix an element to the top of the page while scrolling? header { position: ????; top: 0; } static absolute relative fixed Question 34 2 / 2 pts Which CSS property is used to control the space between lines of text? text-spacing line-spacing text-line line-height Incorrect Question 35 0 / 2 pts Which CSS property is used to change the order of elements in a flex container? flex-order order position arrange Incorrect Question 36 0 / 2 pts What does the following CSS code do when applied to an element? div { float: right; clear: both; } It ensures the element does not float and clears any floating elements above it. It positions the element on the right and prevents it from floating. It positions the element on the right but allows other elements to float around it. It ignores the float property. Question 37 2 / 2 pts What is the purpose of the following CSS code? p{ color: blue; } It adds a border to paragraphs. It underlines paragraph text. It changes the background color of paragraphs to blue. It changes the text color of paragraphs to blue. Incorrect Question 38 0 / 2 pts What does the following CSS rule do? #main { width: 100%; } It sets the width of the element with the class main to 100%. It sets the width of all elements to 100%. It sets the width of the page to 100%. It sets the width of the element with the id main to 100%. Question 39 2 / 2 pts Which CSS property is used to add space between the border and content of an element? padding border-spacing margin spacing Question 40 2 / 2 pts What will happen when the following CSS code is applied?.container { display: flex; justify-content: space-between; } The content inside.container will be stacked on top of each other with even spacing. The content inside.container will have equal margins between them. The content inside.container will be aligned to the left. The content inside.container will be aligned in a row and evenly spaced. Question 41 2 / 2 pts Which CSS property is used to specify the type of bullet or marker for a list? bullet-style marker-style list-style-type list-marker Question 42 2 / 2 pts Multiple CSS classes can not be used within the same HTML element. True False Incorrect Question 43 0 / 2 pts What is the purpose of the following CSS code? img { border-radius: 50%; } It creates a circular image. It creates a square border around images. It removes the border from images. It makes images have rounded corners. Question 44 2 / 2 pts What will be the result of the following CSS? p{ font-size: 20px; } The paragraph text will be 20 pixels tall. The paragraph text will be bold. The paragraph background will be 20px wide. The paragraph will have a margin of 20px. Incorrect Question 45 0 / 2 pts Which CSS property is used to change the style of the cursor when it hovers over an element? pointer hover-cursor cursor mouse-cursor Incorrect Question 46 0 / 2 pts How does TDD contribute to code quality and maintenance? By speeding up the development process By ensuring that all tests are passing By eliminating the need for code reviews By reducing the number of test cases Incorrect Question 47 0 / 2 pts What is Test-Driven Development (TDD)? A project management methodology A testing methodology focused on post-development testing A testing framework for Django applications A development approach where tests are written before the actual code Question 48 2 / 2 pts What is a "unit test" in the context of TDD? A test that verifies database integrity A test that focuses on a specific function or piece of code A test that simulates user interactions A test that checks the entire application Incorrect Question 49 0 / 2 pts What are the three main steps in the TDD cycle? Refactor, write code, write tests Refactor, write tests, write code Write code, write tests, refactor Write tests, write code, refactor Question 50 2 / 2 pts What is the purpose of the "Red-Green-Refactor" cycle in TDD? To organize code review sessions To continuously refactor the code without writing tests To write code first and then write tests To ensure that failing tests are written before code implementation