हिंदी

Differentiate between a tag and an attribute in HTML with the help of a suitable example. - Computer Applications

Advertisements
Advertisements

प्रश्न

Differentiate between a tag and an attribute in HTML with the help of a suitable example.

अंतर स्पष्ट करें
Advertisements

उत्तर

Sr no. Feature HTML Tag HTML Attribute
1. Definition It is a fundamental building block of HTML used to define elements or structure. It provides additional properties or settings to an HTML tag.
2. Placement It is written within angle brackets (e.g., <p> ). It is always written inside the opening tag.
3. Role It tells the browser what content to display (such as a heading or an image). It tells the browser how to display the content (like colour or size).
4. Example <body>, <img>, <a> bgcolor, src, href
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Official Board Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×