0% found this document useful (0 votes)
10 views

HTML Reviewer P

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

HTML Reviewer P

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HTML REVIEWER

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)

• The <!DOCTYPE html> declaration defines that this document is an HTML5


document
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the HTML page
• The <title> element specifies a title for the HTML page (which is shown in the
browser's title bar or in the page's tab)
• The <body> element defines the document's body, and is a container for all the
visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists,
etc.
• The <h1> element defines a large heading
• The <p> element defines a paragrap
Other Elements in HTML:
<br>: Line break.
<hr>: Horizontal rule (line).
<strong>: Strong importance (bold).
<em>: Emphasized text (italic).
<blockquote>: Quotation from another source.
<ul>: Unordered list.
<ol>: Ordered list.
<li>: List item.
<dl>: Description list.
<dt>: Term in a description list.
<dd>: Description for a term.
Link element for hyperlinks or directory on links:
<a>: Anchor element for hyperlinks.

Images and media elements:


<img>: Embeds images.
<video>: Embeds video content.
<audio>: Embeds audio content.
<src>: Specifies multiple media resources for <video> or <audio>.

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:

HTML was invented by: Tim Berners-Lee

Basic Components 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 paragraphs are defined with the <p> tag:

HTML Links

- HTML links are defined with the <a> tag:


Nested HTML Elements
- HTML elements can be nested (this means that elements can contain other
elements).
- All HTML documents consist of nested HTML elements.
- The following example contains four HTML elements
(<html>, <body>, <h1> and <p>):
HTML ATTRIBUTES
• All HTML elements can have attributes
• The href attribute of <a> specifies the URL of the page the link goes to
• The src attribute of <img> specifies the path to the image to be displayed
• The width and height attributes of <img> provide size information for images
• The alt attribute of <img> provides an alternate text for an image
• The style attribute is used to add styles to an element, such as color, font, size,
and more
• The lang attribute of the <html> tag declares the language of the Web page
• The title attribute defines some extra information about an element
Headings
- HTML headings are defined with the <h1> to <h6> tags.
- <h1> defines the most important heading. <h6> defines the least important
heading.
<h1></h1> is the largest headings
<h6></h6> is the smallest headings

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

HTML Horizontal Rules


- The <hr> tag defines a thematic break in an HTML page, and is most often
displayed as a horizontal rule.
- The <hr> element is used to separate content (or define a change) in an HTML
page:
HTML Line Breaks

- The HTML <br> element defines a line break.

- Use <br> if you want a line break (a new line) without starting a new
paragraph:

The Poem Problem

- This poem will display on a single line:

Solution - The HTML <pre> Element

- The HTML <pre> element defines preformatted text.

- The text inside a <pre> element is displayed in a fixed-width font (usually


Courier), and it preserves both spaces and line breaks:
The bgcolor attribute was used in older versions of HTML to set the background color of
an element, typically for the <body> tag or table cells. However, it’s now considered
outdated and not recommended for use in modern web development.

You might also like