Very Short Question and Answers - HTML Document Structure
Ans:
It tells the browser which version of HTML is being used; specifically, it declares that the document is HTML5.
Ans:
It is placed at the very top of the HTML document, before any other HTML code.
Ans:
Browsers may render the page in quirks mode, leading to display problems.
Ans:
The <html> element is the root element of every HTML page.
Ans:
The two main sections are <head> and <body>.
Ans:
It contains metadata or information about the document that isn't displayed directly on the web page.
Ans:
Common elements include <title> for the page title and <meta> for metadata.
Ans:
It sets the title of the page, which appears on the browser tab.
Ans:
It contains all the content that is visible to the user, such as text, images, and links.
Ans:
Examples include paragraphs (<p>), headings (<h1> to <h6>), images, tables, and lists.
Ans:
It is placed inside the <head> section and specifies the character encoding for the document.
Ans:
Meta tags provide metadata that assists with SEO, accessibility, search engines, and browser behavior.
Ans:
By using the lang attribute in the <html> tag, e.g., <html lang="en">.
Ans:
<head> contains metadata not directly visible to users, while <body> contains the visible page content.
Ans:
In the <head> section, using the <link> tag (e.g., <link rel="stylesheet" href="styles.css">).
Ans:
It helps control how the webpage is displayed on mobile devices by setting width and scale.
Ans:
'Metadata' is data about the webpage placed in <head>; 'content' is information shown to users in <body>.
Ans:
It is called the root or container element of the HTML document.
Ans:
It ensures that the browser correctly displays all characters, symbols, and languages on the page.
Ans:
HTML5 made the Doctype simpler and more universal, and made meta tags more powerful and essential for modern web development.