CSS Treehouse Club: CSS My First Web Page What's New in Your HTML

PRARTHITA SAHA
PRARTHITA SAHA
1,009 Points

what is the difference between an attribute and a metadata?

Is there any kind of differnce in between these two or is attribute one kind of metadata?

luther wardle
luther wardle
12,050 Points

metadata can describe attributes, and could be considered their children in some contexts. So the best way I can answer would be that an attribute provides functionality, while meta data might be better able to describe what that functionality actually is to the user or some other system that is reading off the attributes.

I hope that helps!

Brian Johnson
Brian Johnson
Front End Web Development Techdegree Student 14,179 Points

Both of these definitions are taken from the Mozilla Developer Network. It’s a great resource if you want to look specific information on HTML, CSS & JavaScript terms. 😁

Metadata is β€” in its very simplest definition β€” data that describes data. For example, an HTML document is data, but HTML can also contain metadata in its <head> element that describes the document β€” for example who wrote it, and its summary.

An attribute extends a tag, changing its behavior or providing metadata. An attribute always has the form name=value (the attribute's identifier followed by its associated value).