HTML Questions and Answers
HTML Questions and Answers
A: <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
A: Block-level take full width (e.g., <div>), inline flow within a line (e.g., <span>).
Q: What is the use of the <a> tag and how do you create a hyperlink?
A: Attributes like id, class, style, title that can be used on any element.
</form>
A: action defines where to send data; method defines how (GET or POST).
A: <select name="options">
</select>
4. Semantic HTML
A: Uses meaningful tags like <article> and <section> for better readability and SEO.
A: <ol><li>First</li></ol> <ul><li>Item</li></ul>
7. HTML5 Features
A: Use alt text, semantic tags, aria attributes, and proper headings.