How do I set the HTML search box? Example of how to use an HTML search box input tag

Source: Internet
Author: User
This article is mainly about the HTML search box settings, as well as some examples of how to use the HTML search box input tag, let's read this article about HTML search box.

Let's start by setting up a simple search box:

<input type= "text" class= "AA" ><input type= "button" value= "search" class= "BB" >

This is a search box of the simplest style, without a very complex style. If you need a design style that can be written according to class= "AA",. aa{} Add code in parentheses, of course, this is the style of the box, the style of the button. bb{} fill in the code in parentheses. Effects displayed in the browser

This is the code for a simple search box.

Now, let's talk about how to use the input tag, first look at an example

Let's take a look at the more advanced search box complete code:

<! DOCTYPE html>

This code looks:

This effect than the first look too much, is a bit more code, are the basic knowledge of CSS style, if you do not understand can leave a message below.

Note: The <input> element is empty, and it contains only the label attributes.

Tip: You can use the <label> element to define the label for the <input> element.

OK, the above is about our use of the HTML input tag, there are questions can be left in the comments below.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.