1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is HTML?
A markup language used to structure and display web pages.
What are HTML tags?
Keywords in angle brackets (e.g., <p>) that define elements.
What is the basic structure of an HTML document?
It starts with <!DOCTYPE html>, then <html>, <head>, and <body>.
What is the difference between a tag and an element?
Tag = syntax (<p>),
Element = tag + content (<p>text</p>).
What are attributes in HTML?
Extra info for elements, written as name=“value” (e.g., href in <a>).
How do you create a hyperlink?
Using <a href="url">Text</a>.
What is the purpose of <img>?
To display images with src and alt attributes.
What is the difference between block-level and inline elements?
Block = new line (<div>),
Inline = within text (<span>).
How do you create a list?
Ordered = <ol>,
Unordered = <ul>.
What is the <form> tag used for?
To collect user input.
What is the <br> tag used for?
Line break.
How do you open a hyperlink in a new tab?
<a href="url" target="_blank">.
What is the <title> tag used for?
Sets the page title shown in the browser tab.
How do you add a comment in HTML?
<!-- Comment -->.
What is the <meta> tag used for?
Metadata like charset, description, author.
How do you create a table?
Using <table>, <tr>, <td>, <th>.
Difference between <head> and <body>?
<head> = info/settings, <body> = page content.
How do you specify character encoding?
<meta charset="UTF-8">.
What is <strong> used for?
Strong importance (usually bold).
How do you create an email link?
<a href="mailto:someone@example.com">Email</a>.
What is <em> used for?
Emphasized text (usually italic).
How do you create a checkbox?
<input type="checkbox">.
What is the <label> tag used for?
Defines labels for inputs (improves accessibility).
How do you create a dropdown?
<select><option>Item</option></select>.
What is <blockquote> used for?
To display quoted text.
What are semantic elements?
Elements with meaning (<header>, <nav>, <article>).
How do you embed a video?
Using <video controls><source src="file.mp4"></video>.
What is the alt attribute?
Alternative text for images, improves accessibility.
What is <fieldset> used for?
To group form elements with a <legend> title.
What is <noscript> used for?
Fallback content if JavaScript is disabled.
How do you include JavaScript in HTML?
<script src="file.js"></script>.
Difference between <b> and <strong>?
Both bold, but <strong> adds meaning.
How do you create multi-line text input?
Using <textarea>.
What is the action attribute in forms?
Specifies where form data is sent.
How do you create a numbered list?
<ol><li>Item</li></ol>.
What is <base> used for?
Sets a base URL for relative links.
How do you create a definition list?
Using <dl>, <dt>, <dd>.
What is enctype in forms?
Defines encoding for submitted data (multipart/form-data for files).
How do you create a hidden field?
<input type="hidden" value="data">.
What is <address> used for?
Contact information.
What is <canvas> used for?
To draw graphics with JavaScript.
Difference between <b>/<i> and <strong>/<em>?
First = styling only,
Second = styling + meaning.
How do you include SVG in HTML?
Using <svg> directly inside HTML.
What are data- attributes?*
Custom attributes to store extra data (data-id="123").
What is <template> used for?
Reusable HTML fragments that aren’t rendered until used by JavaScript.
What is the rel attribute in <link>?
Defines the relationship (e.g., rel="stylesheet").
How do you provide multiple language versions of a page?
Using <link rel="alternate" hreflang="fr" href="page-fr.html">.
What is <output> used for?
Displays calculation results in forms.
How do you make an element editable?
contenteditable="true".
What is <datalist> used for?
Provides autocomplete options for an <input>.