HTML Basics Questions and Answers
100% Pass
What is a responsive design in web development?
Responsive design refers to an approach that makes web pages render well on various
devices and screen sizes, using fluid grids and flexible images.
What does the `<style>` tag do?
The `<...
HTML Basics Questions and Answers
100% Pass
What is a responsive design in web development?
✔✔Responsive design refers to an approach that makes web pages render well on various
devices and screen sizes, using fluid grids and flexible images.
What does the `<style>` tag do?
✔✔The `<style>` tag is used to define CSS rules within an HTML document, allowing for the
styling of elements directly in the HTML file.
What is an attribute selector in CSS?
✔✔An attribute selector in CSS targets elements based on the presence or value of a specified
attribute, allowing for more precise styling.
What is the role of the `<form>` tag?
✔✔The `<form>` tag is used to create an HTML form for user input, allowing for the collection
of data through various input elements.
1
,What is the significance of the `id` attribute in HTML?
✔✔The `id` attribute assigns a unique identifier to an HTML element, enabling CSS styling and
JavaScript manipulation specific to that element.
What is the purpose of the `target` attribute in an anchor tag?
✔✔The `target` attribute specifies where to open the linked document, with options such as
`_blank` for a new tab or `_self` for the same tab.
What is the function of the `<title>` element in an HTML document?
✔✔The `<title>` element defines the title of the webpage, which appears in the browser tab and
is important for search engine indexing.
What is the difference between `class` and `id` attributes in HTML?
✔✔The `class` attribute can be used to apply styles to multiple elements, while the `id` attribute
is unique to a single element within a page.
What does the `<iframe>` tag do?
✔✔The `<iframe>` tag is used to embed another HTML document within the current document,
allowing for the display of content from other sources.
2
, What is the significance of the `viewport` meta tag?
✔✔The `viewport` meta tag controls the layout on mobile browsers, ensuring proper scaling and
responsiveness of the webpage.
What is a hyperlink in HTML?
✔✔A hyperlink is a clickable link that directs users to another webpage or resource, typically
created using the `<a>` tag with an `href` attribute.
What is CSS in the context of web development?
✔✔CSS, or Cascading Style Sheets, is a stylesheet language used to describe the presentation
and layout of HTML documents, controlling visual styles such as colors, fonts, and spacing.
What does the `<img>` tag do?
✔✔The `<img>` tag is used to embed images in a webpage, requiring a `src` attribute to specify
the image source.
What is the purpose of the `alt` attribute in an image tag?
3
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller StellarScores. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.99. You're not tied to anything after your purchase.