Computer Science, asked by mariposa12, 10 months ago

Accept the name of your class teacher using JavaScript and display it in blue colour and in a bigger size. ​

Answers

Answered by mmainak968
0

Answer:

Web forms are used by virtually all websites for a wide range of purposes. Users of forums and social networks use forms to add content and interact with other users. Websites that can be customized to create a personalized experience, such as customizable newsfeeds, use forms to allow users to control the content that appears on the page. And nearly every website uses forms to allow website visitors to contact the organization or person administering the website. Web forms are made possible by the integration of multiple technologies:

HTML to create the form fields and labels and accept user input.

CSS to style the presentation of the form.

JavaScript to validate form input and provide Ajax-enabled interactions.

Server-side languages such as PHP to process form data.

In this guide, we're going to cover all of the HTML elements used to create web forms. We also have other tutorials that cover topics such as building a form, styling and designing forms, and ensuring form usability and accessibility.

Contents [hide]

1 Defining the Structure of a Form

1.1 Grouping Form Fields

2 The Input Element

2.1 Common <input type=""> Values

2.2 Less Common <input type=""> Values

2.3 New <input type=""> Values Added by HTML5

2.4 Common Input Attributes

2.5 New Attributes Added by HTML5

3 Drop-Downs, Text Areas, & Buttons

3.1 Pre-Populated Drop-Down Lists

3.2 Free Form Text Areas

3.3 Flexible Buttons

3.4 Form Elements Added in HTML5

4 Next Steps

5 Frequently Asked Questions

5.1 How do you restrict a form field to only accept numbers?

5.2 How do you restrict a form field to only accept alphanumeric characters?

5.3 How do you make a form submit when the user presses enter?

6 Related Elements

7 Tutorials and Resources

Defining the Structure of a Form

Every web form must be wrapped in <form> tags. In most cases, all of the form fields will be nested between these tags. There are several attributes that may optional be used with the form element, including: accept-charset: This optional attribute is used to identify the character encodings acceptable to the server and code processing form input. If more than one encoding is specified, one space should be placed between each encoding. If left blank or not provided, the encoding will default to the same encoding as the document containing the form. action: This attribute is used to specify a URL where form data should be sent (for instance: http://example.com/form_file.php). This field was required prior to HTML5 but is now optional. autocomplete: Use this attribute if you want the visitors browser to suggest form responses based on saved entries. The default value is autocomplete="on". If you turn autocomplete off you must also turn it off on every field that may allow autocompletion. enctype: Used to specify how form data should be encoded. Only used if the method attribute mentioned below is set to post. There are three possible values:

application/x-www-form-urlencoded: The default value which replaces all spaces with “+” and converts all special characters to ASCII HEX values.

multipart/form-data: Nothing is encoded. Input is uploaded to the server exactly as it is entered into the form.

text/plain: Spaces are converted into “+” symbols, but not other characters are encoded.

method: Dictates the HTTP method a website visitors browser should use to submit form data. If post is specified, form data is enclosed in the body of the HTTP request. If get is specified, form data is appended to the end of the URL specified in the action attribute with a “?” symbol, data length is limited to 300 characters, and form input is visible and can be bookmarked. name: Similar to an id attribute, a name is a unique identifier that may only be used once within an HTML document and may be used to select the form with JavaScript or another scripting language. novalidate: Used to override the default validation of form data. target: Specifies where to display the response received after submitting the form.

_self loads the response in the same frame.

_blank opens a new window or tab.

_parent is used when a form is nested in a descendant browsing context to load the response in the parent context and behaves the same as _self is there is no parent context.

_top is similar to _parent but select the top level browsing context rather than the immediate parent context.

Grouping Form Fields

Answered by Anonymous
0

Answer:

Learn how to use HTML and CSS to make webpages. ... CSS rules, to select based on element, class, or ID, and change the colors of your page. ... Challenge: Great big font sizes.

Similar questions