Explain the difference between a tag and an attribute. | question and answer !



Question:-

Explain the difference between a tag and an attribute.

Answer:-

A tag is a command that instructs the web browser, what to display and in which sequence to display the contents of the web page. It shows tha structure and appearance of a document or a web page that is created.

For example, <HTML>

An attribute is used inside an HTML tag and contains additional information about that specific tag. The information can be a formatting effect, alignement or color.

For Example, <BODY BGCOLOR = "RED"> Here, the background color of the web will be displayed as red.

No comments