Attribute | Description |
---|---|
align | align is used to align right or left or center and also known as Horizontal tags |
bgcolor | bgcolor is used to set the background color of the elements |
background | background is used to set the background image of the elements. |
accesskey | accesskey used to access an element by using keyboard short cuts. |
class | which is used to classify the elements for cascading style sheets. |
contextmenu | which is used for the context menu for the element. |
draggable | draggable gives permissions to drag the elements. |
hidden | hidden used to hide the element. |
height | which is used to adjust height of the image, tables etc. |
item | which is used top group the elements. |
style | which is used to specify the inline styles |
valign | which is used to align vertically at the top or middle or bottom. |
width | which is used to adjust the width of the tables , images etc. |
tabindex | which is used to specify the tab index. |
data-
and remaining name should be based on user requirement as shown below.
[html]
<div class="”examples”">;
…
</div>
[/html]
The above code demonstrates relation between the two attributes. In order to get the values user need to use the JavaScript APIs or CSS.
on
the element value gets updated automatically based on previous entered values as shown in below example.
[html]<!DOCTYPE html>
<html>
<body>
<form action="action_page.php" autocomplete="on">
Name:<input type="text" name="fname"><br>
Father name: <input type="text" name="lname"><br>
E-mail: <input type="email" name="email" autocomplete="off"><br>
<input type="submit">
</form>
<p>Fill in and submit the form, then reload the page to see how autocomplete works.</p>
<p>Notice that autocomplete is "on" for the form, but "off" for the e-mail field.</p>
</body>
</html>
[/html]
Output of the above code is as shown in below image.
http data
to the action URL as shown in below example.
[html]<!DOCTYPE html>
<html>
<body>
<form action="action_page.php" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
<input type="submit" formmethod="post" formaction="demo_post.asp" value="Submit using POST">
</form>
<p><strong>Note:</strong> The formmethod attribute of the input tag is not supported in Internet Explorer 9 and earlier versions.</p>
</body>
</html>
[/html]
Output of the above code is as shown in below image.
on
the element values gets updated automatically based on previous entered values as shown in below example.
[html]<!DOCTYPE html>
<html>
<body
<form action="action_page.php" autocomplete="on">
Name:<input type="text" name="fname"><br>
Father name: <input type="text" name="lname"><br>
E-mail: <input type="email" name="email" autocomplete="off"><br>
<input type="submit">
</form>
<p>Fill in and submit the form, then reload the page to see how autocomplete works.</p>
<p>Notice that autocomplete is "on" for the form, but "off" for the e-mail field.</p>
</body>
</html>
[/html]
Output of the above code is as shown in below image.