HTML Flashcards
What does HTML stand for?
Hyper Text Markup Language
What is the purpose of HTML?
To describe human-readable documents on the Internet, including content, presentation instructions, metadata, and code for browsers.
What is hypertext?
Text containing hyperlinks to other documents or parts of documents, allowing navigation by clicking the links.
What is the basic structure of an HTML element?
An element consists of a start tag, content, and an end tag (e.g., <p>Content</p>)
What are HTML attributes?
Key-value pairs in the start tag that provide additional information about an element (e.g., <p id="intro">)
What is the minimal structure of an HTML document?
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>Content</body>
</html>
What does the head element contain?
Document metadata like title, meta tags, links to stylesheets, and scripts
What is the difference between block-level and inline-level elements?
Block-level elements (e.g., div, p) are rendered separately, while inline-level elements (e.g., span, a) flow with the text
How do you create a hyperlink in HTML?
<a>Link Text</a>
What is the difference between absolute and relative URLs?
Absolute URLs include protocol, host, and path (e.g., https://example.com/page), while relative URLs are interpreted relative to the current document (e.g., page.html)
How do you include an image in HTML?
<img></img>
How do you create an ordered list?
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
What is the purpose of the table element?
To organize data into rows and columns using tr, td, and th elements.
How do you create a text input field?
<input></input>
What is the purpose of the form element?
To group input controls and specify where and how data is sent (using action and method attributes).
How do you write a comment in HTML?
<!-- This is a comment -->