Back to notes
What are <figure> and <figcaption> tags used for in HTML?
Press to flip
They are used to group an image and its caption, providing better semantic structure.
Describe the difference between an absolute and a relative link.
An absolute link includes the full URL, while a relative link is relative to the current site.
Explain the role of the <nav> element in HTML5.
The <nav> element is used for defining navigation links, improving semantic structure and accessibility.
Explain the difference between <ol>, <ul>, and <dl> list tags.
<ol> is used for ordered lists, <ul> for unordered lists, and <dl> for description lists.
Why is validating HTML important? Name the tool used for validation.
Validation ensures the HTML is correctly formatted and accessible. The W3C Markup Validation Service is used for this purpose.
What are the benefits of using semantic HTML tags like <header>, <main>, and <article>?
They provide meaning and context to the content, improving accessibility and SEO.
What is the difference between block-level elements and inline elements? Give two examples of each.
Block-level elements (e.g., <p>, <div>) take up the full width available, while inline elements (e.g., <a>, <em>) only take up as much width as necessary.
What is the importance of the 'lang' attribute in the <html> tag?
It specifies the language of the document, which is important for accessibility and search engine optimization.
Why should only one <h1> tag be used per page?
The <h1> tag represents the main heading and structure of the document, contributing to SEO and accessibility.
How does the 'loading="lazy"' attribute in the <img> tag improve web performance?
It defers loading of images until they are needed, reducing initial load time.
What is the primary role of HTML in web development?
HTML defines the meaning and structure of web content.
What attributes are necessary for creating a link that opens in a new tab?
The 'href' attribute for the URL and 'target="_blank"' to specify opening in a new tab.
Identify and describe the purpose of at least three different form elements.
<input> for user input, <label> for input description, and <textarea> for multi-line text input.
What are the benefits of using a tool like Live Server during web development?
Live Server automatically reloads the web page upon saving changes, improving development efficiency.
What is the purpose of the 'charset' attribute in the <meta> tag?
It specifies the character encoding for the HTML document, ensuring proper display of text.
When should the <aside> element be used in HTML?
For content that is tangentially related to the main content, often presented as sidebars.
Name the two main parts of an HTML document and describe their roles.
The head contains metadata, while the body contains the visible content.
Previous
Next