{"id":4159,"date":"2023-09-20T06:19:59","date_gmt":"2023-09-20T06:19:59","guid":{"rendered":"https:\/\/janityadav.com\/olddj\/?p=4159"},"modified":"2025-03-14T21:20:48","modified_gmt":"2025-03-14T15:50:48","slug":"html-attributes","status":"publish","type":"post","link":"https:\/\/janityadav.com\/olddj\/html-attributes\/","title":{"rendered":"What is HTML\u00a0Attributes"},"content":{"rendered":"<ul class=\"wp-block-list\"><li>HTML Elements can have attributes.<\/li>\r\n\r\n<li>Attributes provide additional information about an element.<\/li>\r\n\r\n<li>Attributes are written inside the start tag:<\/li><\/ul><p>&lt;a href=&#8221;https:\/\/www.w3schools.com&#8221;&gt;This is a link&lt;\/a&gt; has an\u00a0 attribute and the\u00a0<\/p><p>attribute value:<\/p><p><strong>attribute: &#8211;<\/strong> href and the\u00a0<\/p><p><strong>attribute value:<\/strong> &#8220;https:\/\/www.w3schools.com&#8221;<\/p><h3 class=\"wp-block-heading\">HTML Elements can have multiple attributes:\u00a0<\/h3><p>&lt;img src=&#8221;digitaljanit.jpg&#8221; alt=&#8221;digitaljanit.com&#8221; width=&#8221;100&#8243; height=&#8221;102&#8243;&gt;\u00a0<\/p><h3 class=\"wp-block-heading\">The above HTML element has four attributes:<\/h3><p>\u00a0src, alt, width, and height<\/p><h3 class=\"wp-block-heading\">HTML5 introduced a few new attributes, such as:<\/h3><p>\u00a0placeholder, autofocus, and required.\u00a0<\/p><p>The global attributes are attributes that can be used on any HTML element.\u00a0<\/p><p>The event attributes are attributes that can be used to define JavaScript events.<\/p><figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\">\r\n<div class=\"wp-block-embed__wrapper\">https:\/\/youtu.be\/x4JITqjjhaU?si=uLGta1vhZ5T_Oeaa<\/div>\r\n<\/figure>","protected":false},"excerpt":{"rendered":"<p>&lt;a href=&#8221;https:\/\/www.w3schools.com&#8221;&gt;This is a link&lt;\/a&gt; has an\u00a0 attribute and the\u00a0 attribute value: attribute: &#8211; href and the\u00a0 attribute value: &#8220;https:\/\/www.w3schools.com&#8221; HTML Elements can have multiple attributes:\u00a0 &lt;img src=&#8221;digitaljanit.jpg&#8221; alt=&#8221;digitaljanit.com&#8221; width=&#8221;100&#8243; height=&#8221;102&#8243;&gt;\u00a0 The above HTML element has four attributes: \u00a0src, alt, width, and height HTML5 introduced a few new attributes, such as: \u00a0placeholder, autofocus, and required.\u00a0 The global attributes are attributes that can be used on any HTML element.\u00a0 The event attributes are attributes that can be used to define JavaScript events.<\/p>\n","protected":false},"author":213,"featured_media":4322,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_glsr_average":0,"_glsr_ranking":0,"_glsr_reviews":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/posts\/4159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/users\/213"}],"replies":[{"embeddable":true,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/comments?post=4159"}],"version-history":[{"count":2,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/posts\/4159\/revisions"}],"predecessor-version":[{"id":38789,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/posts\/4159\/revisions\/38789"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/media\/4322"}],"wp:attachment":[{"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/media?parent=4159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/categories?post=4159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/janityadav.com\/olddj\/wp-json\/wp\/v2\/tags?post=4159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}