+ 2
I am confused with the use of 'class ', 'type ', 'method ', and 'action '. (HTML)
Can anybody tell me? If you can, please add some codes for example☆ Thank you
6 Antworten
+ 8
The class attribute specifies one or more classnames for an element.
The class attribute is mostly used to point to a class in a style sheet. However, it can also be used by a JavaScript (via the HTML DOM(DOM is Document Object Model) to make changes to HTML elements with a specified class.
example
<html>
<head>
<style>
h1.intro {
color: blue;
}
p.important {
color: green;
}
</style>
</head>
<body>
<h1 class="intro">Header 1</h1>
<p>A paragraph.</p>
<p class="important">Note that this is an important paragraph. :)</p>
</body>
</html>
+ 10
For button elements, the type attribute specifies the type of button.
For input elements, the type attribute specifies the type of <input> element to display.
For menu elements, the type attribute specifies the type of menu.
For embed, link, object, script, source, and style elements, he type attribute specifies the Internet media type
example
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_button_type
+ 10
The <form> tag is used to create an HTML form for user input.
The <form> element can contain one or more of the following form elements:
<input>
<textarea>
<button>
<select>
<option>
<optgroup>
<fieldset>
<label>
example
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit
+ 10
The action attribute specifies where to send the form-data when a form is submitted.
Applies to
<form>
example
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit
+ 3
@??
Thnx I love to help
+ 1
Thank you very much!!
Now I understand them^^