Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Chapter no.7:- <form>tag HTML <form> Tag :-, Lecture notes of Web Programming and Technologies

The form-handler is typically a server page with a script for processing input data. 4) <input type="reset"> defines a reset button that will reset all form ...

Typology: Lecture notes

2021/2022

Uploaded on 08/05/2022

nguyen_99
nguyen_99 🇻🇳

4.2

(80)

1K documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter no.7:- <form>tag
HTML <form> Tag :-
The <form> tag is used to add HTML forms to the web page for user input. Forms are used to
pass the data submitted by the user to the server. The data is sent when pressing the "Submit"
button. If there isn’t such button, the information is sent when the "Enter" key is pressed.
Syntax
The <form> tag comes in pairs. The content is written between the opening (<form>) and closing
(</form>) tags.
The <form> element contains other HTML tags, which define the input method of data:
The <input> tag defines a user input field.
The <textarea> tag defines a form field to create a multiline input area.
The <button> tag is used to place a button inside a form.
The <select> tag sets up a control for creating a drop-down list box.
The <option> tag defines the items in the drop-down list set by the <select> tag.
The <optgroup> tag groups related data in the drop-down list set by the <select> tag.
The <fieldset> tag visually groups the elements inside the form set by the <form> tag.
The <label> tag sets the text label for the <input> element.
The <legend> tag defines the header for the <fieldset> element.
Example of <form>tag:-
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<form action="server-script-url-here" method="GET or POST" >
<label for="fname">Name</label>
<input type="text" name="FirstName" id="fname" value="Mary"/><br/><br/>
<label for="lname">Surname</label>
<input type="text" name="LastName"id="lname"
value="Thomson"/><br/><br/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
Example of the HTML <form> tag with the <texarea> tag:
<html>
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Chapter no.7:-
tag HTML Tag :- and more Lecture notes Web Programming and Technologies in PDF only on Docsity!

Chapter no.7:- tag

HTML Tag :-

The tag is used to add HTML forms to the web page for user input. Forms are used to pass the data submitted by the user to the server. The data is sent when pressing the "Submit" button. If there isn’t such button, the information is sent when the "Enter" key is pressed. Syntax The tag comes in pairs. The content is written between the opening () and closing () tags. The

element contains other HTML tags, which define the input method of data:  The tag defines a user input field.  The

HTML Input Types

Here are the different input types you can use in HTML:

Syntax input type:- 1) defines a single-line text input field 2) defines a password field

  1. defines a button for submitting form data to a form-handler.

Note that the form itself is not visible.

Also note that the default width of a text field is 20 characters.

**Output:-**

Text field

The input type="text" defines a one-line text input field: First name: Last name: Note that the form itself is not visible. Also note that the default width of a text field is 20 characters.

Chapter no.8:- DHTML And DOM And CSS DHTML:- DHTML stands for Dynamic HTML, it is totally different from HTML. ... The DHTML is based on the properties of the HTML, javascript, CSS, and DOM (Document Object Model which is used to access individual elements of a document) which helps in making dynamic content. It is the combination of HTML, CSS, JS, and DOM.

DHTML - HTML Document Object Model (DOM)

The DOM presents HTML as a tree-structure (a node tree), with elements, attributes, and text: The HTML DOM is:  A standard object model for HTML  A standard programming interface for HTML  Platform- and language-independent

These paragraphs are styled with CSS.

OUTPUT :- Hello World! These paragraphs are styled with CSS.


Example Explained  p is a selector in CSS (it points to the HTML element you want to style:

).  color is a property, and red is the property value  text-align is a property, and center is the property value

CHAPTER 9:- JAVASCRIPT N VBSCRIPT:-

What is JavaScript :-

JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities. JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers. JavaScript is the programming language of HTML and the Web. JavaScript is easy to learn. This tutorial will teach you JavaScript from basic to advanced.

Advantages of JavaScript:-

  1. Less server interaction − You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
  2. Immediate feedback to the visitors − They don't have to wait for a page reload to see if they have forgotten to enter something.
  3. Increased interactivity − You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.

Limitations of JavaScript:-

  1. Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason.
  2. JavaScript cannot be used for networking applications because there is no such support available.
  3. JavaScript doesn't have any multi-threading or multiprocessor capabilities. SIMPLE EXAMPLE OF JAVA SCRIPT:-

    My First JavaScript