HTML LESSON PLAN
HTML LESSON PLAN
Element Grouping
<div> - This tag defines a division or section of the webpage, allowing you to
group and style related elements.
<span> - This tag is an inline element used to apply styles to specific portions of
text or elements within a paragraph.
Examples:
HTML allows you to create internal links within the same page using anchor tags and the
id attribute. Assign an id to the target element you want to link to, and then use the href
attribute with a preceding # symbol to specify the target element's id. For example: <a
href="#section2">Go to Section 2</a>.
Opening links in a new tab or window:
You can add the target attribute to an anchor tag and set it to _blank to open the link in
a new browser tab or window. For example: <a href="https://www.example.com"
target="_blank">Visit Example</a>.
Common image formats supported in HTML include JPEG, PNG, and GIF. JPEG is suitable
for photographs, PNG for images with transparency or sharp edges, and GIF for simple
animations.
<img> - The image tag is used to insert images into an HTML document. It requires the
src attribute, which specifies the path or URL to the image file. For example: <img
src="image.jpg" alt="Description of the image">
width and height attributes - These attributes define the width and height of the image
in pixels. Specifying the dimensions helps browsers allocate space for the image before
it loads.
align attribute - This attribute specifies the alignment of the image within the
surrounding text. Common values include "left", "right", .
alt attribute - As mentioned earlier, the alt attribute provides alternative text for the
image.
<video> - The video tag is used to embed videos on a webpage. It supports various
attributes like src (the video file URL), controls (displays video controls), width, height,
and more.
<audio> - The audio tag is used to embed audio files. It also supports attributes such as
src, controls, autoplay, and loop.
To add a new row to a table, use the <tr> tag and include the desired number of cells
(<td>) within it. Each cell represents a column in the table.
To add additional columns to an existing row, simply add more <td> elements within the
corresponding <tr>.
<th>: The table header tag is used to define header cells within the <thead> section of a
table. Header cells are typically displayed in bold and centered by default.
<caption>: The caption tag is used to add a caption or title to a table. It is placed
immediately after the opening <table> tag and before the <thead> or <tbody> section.
Attributes such as colspan and rowspan can be added to table cells (<td> or <th>) to
span multiple columns or rows, respectively.
<form> - The form tag is used to create an interactive form on a webpage. It contains
various form elements that allow users to input data.
<input> - The input tag is the most commonly used form element. It provides a wide
range of input types, including text fields, checkboxes, radio buttons, and more.
Form fields
Password fields - <input type="password"> creates a text input field where the entered
text is masked (useful for password inputs).
Radio buttons - <input type="radio"> allows users to select a single option from a group
of choices.
Dropdown menus - <select> with <option> creates a dropdown menu for selecting a
single option from a list.
Text areas - <textarea> creates a multi-line text input field for longer text entries.
Form accessibility
Ensuring form accessibility involves providing appropriate labels for form elements using
the <label> tag. Labels can be associated with input elements using the for attribute or
by nesting the input element within the label element.
<button>: The button tag is used to create a submit button within a form. It triggers the
submission of form data to the server.
HTML5 introduces built-in form validation using attributes like, required, min, max, and
more. These attributes help enforce data entry rules and provide automatic validation
feedback.
Semantic HTML refers to using HTML elements that carry meaning and provide context to the
content they enclose. By using semantic elements, you can enhance the structure and
accessibility of your web pages.
<nav> - The nav tag is used to define a section containing navigation links.
<main> - This tag represents the main content of a webpage, excluding headers, footers, and
navigation
<footer>: This tag represents the footer of a document or a section, typically containing
information about the author, copyright notice, or contact details.
8. HTML5 Advanced Features
<input type="range"> - Creates a slider control for selecting a value within a specified
range.