Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

Text Fields

The <input type=”text”> specifies a single-line input field designed for textual input.

Example

A form featuring text input fields:

<form>
  <label for=”fname”>First name:</label><br>
  <input type=”text” id=”fname” name=”fname”><br>
  <label for=”lname”>Last name:</label><br>
  <input type=”text” id=”lname” name=”lname”>
</form>

The <label> Element

The <label> tag links form elements to improve accessibility, aiding screen readers and enabling users to toggle inputs (like radio buttons or checkboxes) by clicking the label text. The for attribute of <label> must match the id of the associated <input>.