← Back to Week 2

Quiz 1 Study Guide

This study guide covers possible questions for Quiz 1. I answered each question based on my understanding to help me prepare.

Sources:

Take Practice Quiz

Q1. What is the correct order of Git actions after editing files?

git add .git commit -m "message"git push origin main

Q2. What does cd .. do?

Moves you up one directory to the parent folder.

Q3. What is a Git commit?

A saved snapshot of the project at a specific point in time, with a message describing what changed.

Q4. What does HTML stand for?

HyperText Markup Language.

Q5. What does the domain part of a URL represent?

The domain identifies the server where a website is hosted and points users to where the files are stored.

Q6. What is a Git repository?

A folder that stores a project's files along with their version history, managed using Git. It can exist locally or be hosted online like on GitHub.

Q7. What is a merge conflict?

When Git cannot automatically combine changes because the same part of a file was edited in different ways.

Q8. How do you resolve a merge conflict?

Open the conflicted file, manually choose or combine changes, remove conflict markers, then git add and git commit.

Q9. What is Universal Design?

Designing websites so they can be used by as many people as possible, including people with disabilities, without needing special adaptations.

Q10. What is the correct Git sequence to merge a branch into main?

git checkout maingit merge branch-name. Only commit if conflicts occur.

Q11. What is the difference between an absolute path and a relative path?

Absolute: Full location from root (e.g., /Users/joe/index.html)
Relative: Location based on current directory (e.g., ../index.html)

Q12. What is the main benefit of semantic HTML?

Describes meaning and structure so browsers, screen readers, and search engines understand it better—improves accessibility.

Q13. What is the primary purpose of HTML?

To structure and describe the content of a web page.

Q14. What is the purpose of a .gitignore file?

Tells Git which files should not be tracked or pushed, such as environment files or API keys.

Q15. What is the purpose of <!DOCTYPE html>?

Tells the browser to use standards-compliant HTML rendering instead of guessing.

Q16. What is the purpose of the <label> element in a form?

Associates text with an input field, improving usability and accessibility.

Q17. What is the purpose of the aria-label attribute?

Provides an accessible name for elements so screen readers can describe them properly.

Q18. What is the relationship between headings and sectioning elements?

Sectioning elements group related content; headings describe what each section is about. Together they define the page structure.

Q19. What is the role of the <head> section?

Contains metadata: page title, character set, and links to stylesheets (used by browsers and search engines).

Q20. What should you do if someone else pushed to the remote before you?

Pull the remote changes first, resolve any conflicts if needed, then push your changes.

Q21. Which command prints the full path of the current directory?

pwd

Q22. Which HTML element is used to create a hyperlink?

The <a> element.

Q23. What is a Git branch?

An independent line of development that lets you work on changes without affecting the main codebase.

Q24. Which of the following is an absolute path?

/Users/joe/Desktop/info340/index.html

Q25. Which statement is NOT true about HTML?

HTML does not control page styling—styling is handled by CSS.

Q26. What is the difference between HTML, CSS, and JavaScript?

HTML: Structure/content | CSS: Styling/layout | JS: Behavior/interactivity

Q27. What is the purpose of the alt attribute on an image?

Provides text for screen readers and displays a description if the image cannot load. Main purpose is accessibility.

Q28. Why is accessibility important in web development?

Ensures websites can be used by people with disabilities and users with different needs or assistive technologies.

Q29. What does git status tell you?

It shows the current state of the repository: staged files, unstaged changes, and untracked files.

Q30. Why is committing often considered a good practice?

Creates checkpoints, making it easier to track changes, collaborate, and recover from mistakes.