HTML Flashcards
Questions about html
What is <!DOCTYPE html> in HTML5?
<!DOCTYPE html> is an HTML5 document type declaration that specifies the document’s type and version to the browser. It ensures the browser renders the page in standards mode.
What is the difference between <div> and <span> in HTML?</span>
<div> is a block-level element used to group content and create division or sections on a webpage. <span> is an inline-level element used to apply styles or group inline elements.
</span></div>
What are semantic tags and non-semantic tags in HTML?
Semantic tags in HTML (e.g., <header>, <footer>, <nav>, <article>) convey meaning about the content they contain. Non-semantic tags (e.g., <div>, <span>) do not provide inherent meaning and are used for layout or generic grouping.</span>
What is the difference between HTML and HTML5?
HTML is the standard markup language for creating web pages. HTML5 is the latest version of HTML, introducing new elements, attributes, and APIs to enhance web development, multimedia support, and compatibility.
What is the <iframe> tag in HTML5?
<iframe> (Inline Frame) tag in HTML5 is used to embed another HTML document within the current document. It enables displaying external content like maps, videos, or other web pages.
</iframe>
What are the formatting tags in HTML?
Formatting tags in HTML include <b> (bold), <i> (italic), <u> (underline), <strike> (strikethrough), (subscript), (superscript), etc., used to style text.</strike></u></i></b>
What is the difference between <b> and <strong> in HTML?</strong></b>
<b> is a presentational tag used to make text bold without conveying specific importance, while <strong> is a semantic tag indicating strong importance, often styled as bold by default.</strong></b>
What is the viewport meta tag in HTML?
The viewport meta tag (<meta></meta>) in HTML controls how the webpage is displayed on different devices and screen sizes. It sets the initial scale, width, and responsiveness of the page.
What are attributes in HTML?
Attributes provide additional information about HTML elements. They modify the element’s behavior or appearance and are defined within a start tag (e.g., id, class, src, href).
What is a block-level element and an inline element in HTML?
Block-level elements (e.g., <div>, <p>, <h1>-<h6>) start on a new line and take up the full width available. Inline elements (e.g., <span>, <a>, <strong>) do not start on a new line and only take up as much width as necessary.</strong></a></span>