Intro to Front-End Development Flashcards
What are the required tags in a basic HTML document?
<!DOCTYPE html>, <html>, <head>, <title>, <body></title>
Which tags are used for headings?
<h1> to <h6>
</h6></h1>
How do you create a hyperlink?
<a>Link Text</a>
How do you add an image?
<img></img>
What is the purpose of the <form> element?
To create user input forms with fields like <input></input>, <textarea>, <button>, etc.</button></textarea>
What are the three ways to include CSS in a webpage?
Inline styles, internal styles, and external styles.
How do class and ID selectors differ?
.class targets all elements with that class, while #id targets a unique element.
What are the four components of the box model?
Margin, border, padding, content.
Give an example of a pseudo-class.
:hover (styles an element when a user hovers over it).
How do you select an element in JavaScript?
document.querySelector(selector) or document.getElementById(id).
What is an event listener?
A function that runs when a user interacts with an element (e.g., click, hover). Example: element.addEventListener(‘click’, function).
How do you change the text of an element?
element.textContent = ‘New text’;.
What tools are essential for front-end debugging?
Browser Developer Tools (Inspect Element, Console).
How can you make a site responsive?
Use flexible grids, media queries, and relative units like % or rem.
Why are Flexbox and Grid important?
They provide powerful layout systems for aligning and distributing space.