Sree Sankar
Okay! let me, ask you a question?
Which class are you in now?
You wanna study "web basics" so, you folx are in "web development class".
so I can say your class name is web development.
one of you might be in Dance class also, so that person has two classes; dance and web development, after some days that person will join on another multiple classes also, so those all are his class names too.
likewise, html tag has also classes; classes are Attribute of a tag; class="webdevelopment";
Simply for calling html tags on CSS or JS and we can put some styles on those group of tags have similar class name and/or we can use classes for DOM manipulation also; we will talk about this later!
<p class="webdevelopment">
<a class="webdevelopment">
<img class="webdevelopment">
<p class="webdevelopment dance">
<a class="webdevelopment karate">
<img class="webdevelopment karate dance">
It is almost like classes. and its usage is also similar to classes
the different between class and id is where we are using it, The HTML "id" attribute is used to specify a unique "id" for an HTML tag. You cannot have more than one tag with the same "id" in an HTML document. Honestly speaking, if we use multiple time an "id" on HTML document, then also it never returns an "error", but it is incorrect usage and HTML's soul will curse you!
<p id="webdevelopment">
The name attribute specifies a name for an HTML tag. This name attribute can be used to reference the tag in a JavaScript. For a <form> element, the name attribute is used as a reference when the data is submitted.
"name" is so important when it comes to the backend development of a web application.
Example code
<form>
<input type="text" name="fullname">
<input type="text" name="email">
<input type="submit" value="Submit">
</form>
we will talk about this later on following classes!