HTML Reviewer P
HTML Reviewer P
QUIZ 2
INTRODUCTION TO COMPUTING 1
(NOTE: THIS OVERALL NOTE OF DEFINITION OF TERMS IN HTML YOU CAN ALSO
USE THIS AT THE FUTURE ACTS OR EVEN ON FINALS)
Tables
<table>: Defines a table.
<tr>: Table row.
<th>: Table header cell.
<td>: Table data cell.
<caption>: Caption for the table.
Forms
<form>: Container for form elements.
<input>: Input field (text, checkbox, radio, etc.).
<label>: Defines a label for an input element.
<textarea>: Multi-line text input.
<button>: Clickable button.
<select>: Dropdown list.
<option>: Option in a dropdown list.
<fieldset>: Group related elements in a form.
<legend>: Caption for a <fieldset>.
Scripting
<script>: Defines a client-side script (usually JavaScript).
<noscript>: Content to display if scripts are not supported.
Semantic Elements
<header>: Header for a section or page.
<nav>: Navigation links.
<main>: Main content of the document.
<section>: Thematic grouping of content.
<article>: Self-contained content that could be independently distributed.
<aside>: Content aside from the main content (like a sidebar).
<footer>: Footer for a section or page.
<address>: Contact information.
Interactive Elements
<details>: Disclosure widget from which the user can obtain additional information.
<summary>: Summary for the <details> element.
Global Attributes
These attributes can be added to any HTML element:
id: Unique identifier for an element.
class: Class name for styling or scripting.
style: Inline CSS styles.
title: Additional information about an element (shown on hover).
data-*: Custom data attributes.
HISTORY OF HTML:
- All HTML documents must start with a document type declaration: <!DOCTYPE
html>.
- The HTML document itself begins with <html> and ends with </html>.
- The visible part of the HTML document is between <body> and </body>.
HTML Headings
- HTML headings are defined with the <h1> to <h6> tags.
- <h1> defines the most important heading. <h6> defines the least important
heading:
HTML Paragraphs
HTML Links
HTML Paragraphs
- The HTML <p> element defines a paragraph.
- A paragraph always starts on a new line, and browsers automatically add some
white space (a margin) before and after a paragraph.
HTML DISPLAY
- Use <br> if you want a line break (a new line) without starting a new
paragraph: