Die Beschreibung dieser Attribute wurde bereits im vorherigen Artikel besprochen.
Das Legend-Tag akzeptiert auch die zuvor besprochenen globalen Attribute, die ein Standard für alle HTML5-Elemente sind. Einige sind unten aufgeführt:
Context
|
Define the Context
|
Dir
|
The values give the path of the text.
|
Id
|
Its identifier must match the value of a name.
|
Style
|
Specifies the inline and external styles.
|
Lang
|
Determines the language used in the text.
|
Kontext
|
onabort |
It is called when a particular event has been aborted. For example, the web browser immediately video before it is completely downloaded. |
onblur |
Defines the focus of the element. |
oncancel |
Stops the processed event handler. |
Onclick |
Triggers when a click is done |
onchange |
When a click is done somewhere. |
onfocus |
Triggered when the focus is on the given element |
Definieren Sie den Kontext
|
Dir
|
Die Werte geben den Pfad des Textes an.
|
ID
|
Seine Kennung muss mit dem Wert eines Namens übereinstimmen.
|
Stil
|
Gibt die Inline- und externen Stile an.
|
Sprache
|
Bestimmt die im Text verwendete Sprache.
|
4. Ereignisattribute
5. Other Attributes Are
onmouse down, onmouse up, onmouse over, onmouse move, onmouse out, on focus, on blur, onkey press,onkey down,onkey up. The tags that come with the
Examples to Implement Area Tag in HTML
Below are the examples of implementing the area tag in HTML:
Example #1
This section focuses on the form and fieldset. Association of legend tags with the fieldset and preferring to use with the forms gives the best option.
Code:
<!DOCTYPE html>
<html>
<body>
<form>
<fieldset>
<legend>Personal Information:</legend>
FirstName: <input type="text"><br>
LastName: <input type="text"><br>
Email: <input type="text"><br>
Age: <input type="text">
</fieldset>
</form>
</body>
</html>
Output:
Example #2
The below examples show how the fieldset element groups the labels and radio buttons and checklist together. Meanwhile, the legend tag should be given for the caption for the group. A similar approach can be implemented with other controls.
Code:
<!DOCTYPE html>
<html>
<body>
<form action="http://www.educba.com/" method="post">
<fieldset>
<legend>Tutorial</legend>
<input type="radio" name="tutorial class" value="online" id="online">
<label for="online">Online</label>
<input type="radio" name="tutorial class" value="offline" id="offline">
<label for="offline">Offline</label>
</fieldset>
</form>
</body>
</html>
Output:
Example #3
In the following example, we group the information under the HTML tag
Das obige ist der detaillierte Inhalt vonHTML-Legenden-Tag. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!