Home Web Front-end HTML Tutorial fieldset tag, legend tag

fieldset tag, legend tag

Jun 27, 2017 am 11:53 AM
fieldset ie

In the form form, we can group and classify the information in the form. For example, in the form of the registration form, we can group the registration information into
Basic information (generally required)
Detailed information ( Generally optional)
So how can we achieve it better? We can consider adding the following two tags to the form:
Fieldset: Group the forms. A form can have multiple fieldsets.
 Legend: Describe the content description of each group.

Let’s look at the following code:


##Example Source Code

[www.52css.com]


Basic Register

First name:


...


Detailed Register

Interest:
...


...

Fieldset defaults to a border, while legend defaults to normal Displayed in the upper left corner. But on some pages, we don't want the default styles or default layouts of fieldsets and legends to affect the aesthetics of the design. The solution is to set the fieldset's border to 0 and the legend's display to none in CSS.


◆ label label
Everyone should be familiar with label labels. We give a label label to the text label in the form form, and use the for attribute to make it consistent with
Form componentAssociated, the effect is that when you click the text label, the cursor is displayed in the corresponding form component.
Let’s look at the following code:



##Example Source Code

[www.52css.com]

Basic Register





...


Detailed Register





...

...


In addition to the above methods In addition, we can also use label tags to nest the entire form component and text label, see the following code:




##Example Source Code
[ www.52css.com]

First name:



According to the specification, text will be automatically associated with adjacent form components, but unfortunately the mainstream browser IE6 does not support this feature.


◆ accesskey attribute, tabindex attribute

The website should take into account normal use in more browsing environments. For example, when there is no cursor device (such as a mouse), the website should have You can also use keyboard operations to complete the form filling. At this time, clicking has no meaning for them. At this time, we choose the label's accesskey (shortcut key, alt+accesskey attribute value under IE, alt+shift+accesskey attribute value under FF) and tabindex attribute (Tab key, tabindex attribute value is sequence) to add to the form label. Such as label, input, etc. Let’s look at the following code:




Example Source Code
[www.52css.com]



##◆ optgroup label
The function of the optgroup label is defined in the selection list A set of options. We can choose to use the optgroup tag to classify the options of the select element and use the label attribute. The attribute value will be displayed as a non-selectable, indented title in the
drop-down list (select). Please note that optgroups do not support nesting.
Let’s look at the following code:



##Example Source Code

[www.52css.com]



 There is one in IE6 Small bug (no problem in FireFox): When using the keyboard arrow keys to select, in IE, when the selected item is changed from an option of one optgroup to an option of another optgroup, onchange will not be triggered. The solution is to add

onkeydown
or onkeyup events to help solve the problem.
◆ button tag
We define it as a submit button. Within the button element you can place content, such as text or images. This is the difference between this element and the input element button.



##Example Source Code
[www.52css.com]



The button tag provides more More functions and richer content. button separates the button text, and can

add pictures

inside the button, giving the text and pictures more styles to choose from, making the rigid button more vivid and flexible. And using button tags will be more
semantic than input buttons, and can be understood simply from the literal meaning.

The above is the detailed content of fieldset tag, legend tag. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set the width of fieldset How to set the width of fieldset Nov 23, 2023 am 11:39 AM

Methods for setting the width of fieldset: 1. Use the width attribute of CSS; 2. Use the min-width and max-width attributes of CSS; 3. Use CSS flex layout; 4. Use CSS grid layout.

What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) Feb 10, 2024 am 10:30 AM

More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that win11 cannot use the ie11 browser 1. First, right-click the start menu and select "Command Prompt (Administrator)" to open it. 2. After opening, directly enter "Netshwinsockreset" and press Enter to confirm. 3. After confirmation, enter "netshadvfirewallreset&rdqu

Internet Explorer opens Edge: How to stop MS Edge redirection Internet Explorer opens Edge: How to stop MS Edge redirection Apr 14, 2023 pm 06:13 PM

It's no secret that Internet Explorer has fallen out of favor for a long time, but with the arrival of Windows 11, reality sets in. Rather than sometimes replacing IE in the future, Edge is now the default browser in Microsoft's latest operating system. For now, you can still enable Internet Explorer in Windows 11. However, IE11 (the latest version) already has an official retirement date, which is June 15, 2022, and the clock is ticking. With this in mind, you may have noticed that Internet Explorer sometimes opens Edge, and you may not like it. So why is this happening? exist

How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page Mar 20, 2024 pm 09:21 PM

Recently, many win10 users have found that their IE browser always automatically jumps to the edge browser when using computer browsers. So how to turn off the automatic jump to edge when opening IE in win10? Let this site carefully introduce to users how to automatically jump to edge and close when opening IE in win10. 1. We log in to the edge browser, click... in the upper right corner, and look for the drop-down settings option. 2. After we enter the settings, click Default Browser in the left column. 3. Finally, in the compatibility, we check the box to not allow the website to be reloaded in IE mode and restart the IE browser.

How to solve the problem that IE shortcut cannot be deleted How to solve the problem that IE shortcut cannot be deleted Jan 29, 2024 pm 04:48 PM

Solutions to IE shortcuts that cannot be deleted: 1. Permission issues; 2. Shortcut damage; 3. Software conflicts; 4. Registry issues; 5. Malicious software; 6. System issues; 7. Reinstall IE; 8. Use third-party tools; 9. Check the target path of the shortcut; 10. Consider other factors; 11. Consult professionals. Detailed introduction: 1. Permission issue, right-click the shortcut, select "Properties", in the "Security" tab, make sure you have sufficient permissions to delete the shortcut. If not, you can try running as an administrator, etc.

The end of an era: Internet Explorer 11 is retired, here's what you need to know The end of an era: Internet Explorer 11 is retired, here's what you need to know Apr 20, 2023 pm 06:52 PM

June 15, 2022 is the day when Microsoft ends support for Internet Explorer 11 (IE11) and closes its legacy browser chapter. The company has been reminding users of this end-of-life date for some time and calling on them to plan a move to Microsoft Edge. Microsoft bundles IE11 with Windows 8.1 as the modern default web browser for Windows. Although it never reached the (current) heights of Chrome, it was the second most used desktop browser in 2014, behind IE8. Of course, with 20

How to enable IE acceleration function How to enable IE acceleration function Jan 30, 2024 am 08:48 AM

How to enable IE acceleration function? IE is too slow to open web pages, we can enable hardware acceleration mode in it. Many friends reported that when using IE browser, the speed of opening web pages is extremely slow, which also has a certain impact on our browsing of the web. I just want to ask the editor if there is any solution. In this case, you can turn on the hardware acceleration mode of the IE browser. The editor has compiled the method of turning on the acceleration function of IE. If you are interested, take a look below! To enable the acceleration function in IE, open the IE secure browser, click the gear-shaped "Settings" icon in the upper right corner, and select "Internet Options" to enter, as shown in the figure. 2. Click "Advanced" in the tab navigation at the head of the Internet Options window, as shown in the figure. 3.

How to uninstall ie9 browser from win7 How to uninstall ie9 browser from win7 Jul 10, 2023 am 11:41 AM

How to uninstall ie9 from win7? Computers can handle things at work and can also be used for watching TV shows. Just like watching TV dramas, we usually use browsers to watch them. Because there are more and more browsers and their functions are perfect, fewer and fewer people are using ie9 browser now. So how to uninstall the browser in win7? Take a look at win7 How to uninstall IE9 browser from the system. How to uninstall ie9 browser from win7. 1. First, double-click to open MyPC and choose to uninstall or replace the program; 2. Then find "ViewInstallUpdate" and click on it. You can find "windows internet explorer9" inside, then right-click to delete. The above is the editor with wi

See all articles