Basic HTML Flashcards
HyperText Markup Language HTML Elements Definition HTML Base Template Code Parent-to-Child Relationship HTML Word Wrap and Whitespace Block-Level Elements in HTML Inline Elements in HTML Void Elements and Self-Closing Tags HTML Attributes (63 cards)
What does HTML stand for?
HyperText Markup Language
What is the primary purpose of HTML?
To structure the content of web pages and tell the browser how to display that content.
What are the fundamental building blocks of an HTML page?
HTML elements
What are the two most common file extensions for HTML documents?
.html and .htm
What is the latest version of the HTML specification?
HTML5
What is the default character encoding for HTML5?
UTF-8
What is the role of an HTML element in a web browser?
It helps the browser determine the default structure and style of the content to display on the screen.
Are HTML elements and tags the same thing? Explain the difference.
No, they are not the same. Tags begin or end an element in the source code, while elements are part of the DOM (Document Object Model) used for displaying the page in the browser.
Provide a few examples of common HTML tags.
<html></html>
, <head></head>, <body></body>, <div></div>, <p></p>, <img></img></img>
What generally constitutes an HTML element?
An opening HTML tag and a closing HTML tag
What is a self-closing HTML tag? Provide an example.
A tag that doesn’t require a separate closing tag. Example: <img></img>
What is the purpose of the <!DOCTYPE> declaration at the beginning of an HTML document?
It tells the HTML validator which version of HTML standards the web page’s code should comply with.
What happens during HTML validation testing in relation to the <!DOCTYPE> declaration?
The HTML validator checks the web page’s code against the HTML standard specified in the <!DOCTYPE> declaration and reports any code that doesn’t comply.
What is the role of the <html> element in an HTML document?
It tells the browser that the document is an HTML document and represents the root of the HTML document.
What is the purpose of the <head> element in an HTML document? Where is it located?
It’s a container for metadata about the HTML document, located between the <html> and <body> tags.
Is the content within the <head> element typically displayed on the web page? What kind of information does it usually contain?
No, metadata within the <head> is not displayed. It typically defines the document title, character set, styles, links, scripts, and other meta-information.
What is the function of the <title> element?</title>
It sets the title that appears in the browser’s title bar or tab.
What is the purpose of the <body> element in an HTML document?
It contains all the visible content that is displayed on the web page within the HTML document.
In the context of HTML, how can the document structure be visualized in terms of relationships between elements?
As a family tree, illustrating the parent-to-child relationships between different HTML elements.
Define what a ‘child’ element is in HTML.
An element that is directly contained within another HTML element.
How can developers easily visualize the parent-to-child relationships between HTML tags?
By using the browser’s Inspector tool (or developer tools), which clearly shows the nested structure of the HTML.
Why is understanding the parent-to-child relationship important in HTML? (Give at least two reasons)
- It helps in understanding the overall structure and organization of the HTML document. 2. It significantly influences how styles (CSS) are applied to the content.
In the provided HTML code, what is the purpose of the <!DOCTYPE html> declaration?
It declares the document type to be HTML5, ensuring the browser renders the page in standards mode.
Identify the root element in the given HTML structure.
The <html> element.
tag.
) element, what is the purpose of the tag around the word 'dolor'? How does it typically render in a browser?
- tag? How are the list items marked by default?
tag.