{"id":947,"date":"2011-09-01T18:18:18","date_gmt":"2011-09-01T18:18:18","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/09\/01\/basic-html-attributes\/"},"modified":"2021-08-16T23:52:54","modified_gmt":"2021-08-17T03:52:54","slug":"basic-html-attributes","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/","title":{"rendered":"HTML Attributes: Using attributes in HTML tags"},"content":{"rendered":"<p>In HTML, <a href=\"\/support\/website\/html-reference\/\">each tag<\/a> can have different attributes applied. Attributes allow the HTML tags to have specific properties added to them. You can assign a &#8220;<em>class<\/em>&#8221; to either reuse styles throughout your website or style your elements with the &#8220;<em>style<\/em>&#8221; attribute. Don&#8217;t worry about how the style and class attributes work at this moment, this will be discussed further in our Using &amp; Understanding CSS course.<\/p>\n<h2>Basic HTML attributes<\/h2>\n<p>The following example explains how an <code>&lt;a&gt;<\/code> anchor tag uses the attributes &#8220;<span style=\"color: #ff0000;\"><em>href<\/em><\/span>&#8220;, &#8220;<span style=\"color: #008000;\"><em>target<\/em><\/span>&#8220;, and &#8220;<span style=\"color: #0000ff;\"><em>title<\/em><\/span>&#8220;.<\/p>\n<pre style=\"margin-left: 20px;\">&lt;a <span style=\"color: #ff0000;\">href=\"https:\/\/google.com\"<\/span> <span style=\"color: #008000;\">target=\"_blank\"<\/span> <span style=\"color: #0000ff;\">title=\"Click Here\"<\/span>&gt;<\/pre>\n<p>In this example, the anchor is a hyperlink to Google.com. The href attribute will direct the visitor to Google. The target attribute will open the link in a different window or the same window. In this case _blank opens to a new window or tab. The title attribute will display text when hovering over the link. Below is a small list of common attributes used and a description. Below are the most commonly used HTML attributes.<\/p>\n<table border=\"0\" class=\"article_table\">\n<tbody>\n<tr>\n<th colspan=\"2\">Most common HTML Attributes<\/th>\n<\/tr>\n<tr>\n<th width=\"108\">class<\/th>\n<td width=\"915\">This attribute is used to apply CSS styles in a style sheet. For example: <code>&lt;p class=\"paragraph\"&gt;&lt;\/p&gt;.<\/code><\/td>\n<\/tr>\n<tr>\n<th>style<\/th>\n<td>Allows CSS style to be applied to a specific element. An example usage of this is the following: <code>&lt;p style=\"color: #000000\"&gt;&lt;\/p&gt;.<\/code><\/td>\n<\/tr>\n<tr>\n<th>id<\/th>\n<td>This is a particular identifier of the element. This can only be used once per element. For example: <code>&lt;p id=\"para1\"&gt;&lt;\/p&gt;.<\/code><\/td>\n<\/tr>\n<tr>\n<th>title<\/th>\n<td>The title codes information in the tag about the tag. For example in an <code>&lt;a&gt;<\/code> anchor tag, you can use the title attribute to allow a small text pop up when the mouse is hovers over the anchor. For example: <code>&lt;a href=\"\" title=\"Click Here\"&gt;&lt;\/a&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<th>name<\/th>\n<td>This gives the element a name. This is different than the title in that the name is not seen by the visitor. The most common use of this is in the <code>&lt;a&gt;<\/code> anchor tag. The name will navigate the visitor to a specific place on the page. For example: <code>&lt;a name=\"this-page-location\"&gt;&lt;\/a&gt;<\/code>. This will navigate your browser to the location of this anchor when you visit the url in the browser like the following: <code>https:\/\/example.com\/#this-page-location<\/code><\/td>\n<\/tr>\n<tr>\n<th>width<\/th>\n<td>The width attribute can be used in elements that support dimensions. For example: <code>&lt;div width=\"100\"&gt;&lt;\/div&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<th>align<\/th>\n<td>The align attribute tells the browser if the text is centered, left, or right aligned. For example: <code>&lt;div align=\"left\"&gt;&lt;\/div&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These attributes are used most often to style and label your HTML tags. You can add or remove attributes as needed for the tag to function how you want.<\/p>\n<h2>HTML Attribute reference<\/h2>\n<p>Below is an more exhaustive reference and their correlating tags they are used for.<\/p>\n<table border=\"0\" class=\"article_table\">\n<tbody>\n<tr>\n<th>attribute<\/th>\n<th>Supported Elements<\/th>\n<\/tr>\n<tr>\n<td>abbr<\/td>\n<td><code>&lt;td&gt; &lt;th&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>accept-charset<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>accept<\/td>\n<td><code>&lt;form&gt;<\/code> <code>&lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>accesskey<\/td>\n<td><code>&lt;a&gt; &lt;area&gt; &lt;button&gt; &lt;input&gt; &lt;label&gt; &lt;legend&gt; &lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>action<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>align<\/td>\n<td><code>&lt;caption&gt; &lt;iframe&gt; &lt;img&gt; &lt;input&gt; &lt;object&gt; &lt;legend&gt; &lt;table&gt; &lt;hr&gt; &lt;div&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;p&gt; &lt;col&gt; &lt;colgroup&gt; &lt;tbody&gt; &lt;td&gt; &lt;tfoot&gt; &lt;th&gt; &lt;thead&gt; &lt;tr&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>alink<\/td>\n<td><code>&lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>alt<\/td>\n<td><code>&lt;applet&gt;<\/code> <code>&lt;area&gt;<\/code> <code>&lt;img&gt; &lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>archive<\/td>\n<td><code>&lt;applet&gt; &lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>axis<\/td>\n<td><code>&lt;td&gt;<\/code> <code>&lt;th&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>background<\/td>\n<td><code>&lt;tbody<\/code><\/td>\n<\/tr>\n<tr>\n<td>bgcolor<\/td>\n<td><code>&lt;table&gt;<\/code> <code>&lt;tr&gt;<\/code> <code>&lt;td&gt;<\/code> <code>&lt;th&gt;<\/code> <code>&lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>border<\/td>\n<td><code>&lt;table&gt;<\/code> <code>&lt;img&gt;<\/code> <code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>cellpadding<\/td>\n<td><code>&lt;table&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>char<\/td>\n<td><code>&lt;col&gt;<\/code> <code>&lt;colgroup&gt;<\/code> <code>&lt;tbody&gt;<\/code> <code>&lt;td&gt;<\/code> <code>&lt;tfoot&gt;<\/code> <code>&lt;th&gt;<\/code> <code>&lt;thead&gt;<\/code> <code>&lt;tr&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>charoff<\/td>\n<td><code>&lt;col&gt;<\/code> <code>&lt;colgroup&gt;<\/code> <code>&lt;tbody&gt;<\/code> <code>&lt;td&gt;<\/code> <code>&lt;tfoot&gt;<\/code> <code>&lt;th&gt;<\/code> <code>&lt;thead&gt;<\/code> <code>&lt;tr&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>charset<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;link&gt;<\/code> <code>&lt;script&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>checked<\/td>\n<td><code>&lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>cite<\/td>\n<td><code>&lt;blockquot&gt; &lt;q&gt; &lt;del&gt; &lt;ins&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>class<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>classid<\/td>\n<td><code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>clear<\/td>\n<td><code>&lt;br&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>code<\/td>\n<td><code>&lt;applet&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>codebase<\/td>\n<td><code>&lt;applet&gt;<\/code> <code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>codetype<\/td>\n<td><code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>color<\/td>\n<td><code>&lt;basefont&gt;<\/code> <code>&lt;font&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>cols<\/td>\n<td><code>&lt;frameset&gt;<\/code> <code>&lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>colspan<\/td>\n<td><code>&lt;th&gt;<\/code> <code>&lt;td&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>compact<\/td>\n<td><code>&lt;applet&gt; &lt;dir&gt; &lt;dl&gt; &lt;menu&gt; &lt;ol&gt; &lt;ul&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>content<\/td>\n<td><code>&lt;meta&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>coords<\/td>\n<td><code>&lt;area&gt;<\/code> <code>&lt;a&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>data<\/td>\n<td><code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>datetime<\/td>\n<td><code>&lt;del&gt;<\/code> <code>&lt;ins&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>declare<\/td>\n<td><code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>defer<\/td>\n<td><code>&lt;script&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>dir<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>disabled<\/td>\n<td><code>&lt;button&gt;<\/code> <code>&lt;input&gt;<\/code> <code>&lt;optgtoup&gt;<\/code> <code>&lt;option&gt;<\/code> <code>&lt;select&gt;<\/code> <code>&lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>enctype<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>face<\/td>\n<td><code>&lt;basefont&gt;<\/code> <code>&lt;font&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>for<\/td>\n<td><code>&lt;label&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>frame<\/td>\n<td><code>&lt;table&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>frameborder<\/td>\n<td><code>&lt;frame&gt;<\/code> <code>&lt;iframe&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>headers<\/td>\n<td><code>&lt;th&gt;<\/code> <code>&lt;td&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>height<\/td>\n<td><code>&lt;iframe&gt; &lt;td&gt; &lt;th&gt; &lt;img&gt; &lt;object&gt; &lt;applet&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>href<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;area&gt;<\/code> <code>&lt;link&gt; &lt;base&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>hreflang<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;link&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>hspace<\/td>\n<td><code>&lt;applet&gt;<\/code> <code>&lt;img&gt;<\/code> <code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>http-equiv<\/td>\n<td><code>&lt;meta&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>id<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>ismap<\/td>\n<td><code>&lt;img&gt;<\/code> <code>&lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>label<\/td>\n<td><code>&lt;option&gt;<\/code> <code>&lt;optgroup&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>lang<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>language<\/td>\n<td><code>&lt;script&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>link<\/td>\n<td><code>&lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>longdesc<\/td>\n<td><code>&lt;img&gt;<\/code> <code>&lt;frame&gt;<\/code> <code>&lt;iframe&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>marginheight<\/td>\n<td><code>&lt;frame&gt;<\/code> <code>&lt;iframe&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>marginwidth<\/td>\n<td><code>&lt;frame&gt;<\/code> <code>&lt;iframe&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>maxlength<\/td>\n<td><code>&lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>media<\/td>\n<td><code>&lt;style&gt; &lt;link&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>method<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>multiple<\/td>\n<td><code>&lt;select&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td><code>&lt;button&gt;<\/code> <code>&lt;textarea&gt; &lt;applet&gt; &lt;select&gt; &lt;form&gt; &lt;frame&gt; &lt;iframe&gt; &lt;img&gt; &lt;a&gt; &lt;input&gt; &lt;objext&gt; &lt;map&gt; &lt;param&gt; &lt;meta&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>nohref<\/td>\n<td><code>&lt;area&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>noresize<\/td>\n<td><code>&lt;frame&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>noshade<\/td>\n<td><code>&lt;hr&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>nowrap<\/td>\n<td><code>&lt;th&gt;<\/code> <code>&lt;td&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>object<\/td>\n<td><code>&lt;applet&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onblur<\/td>\n<td><code>&lt;a&gt; &lt;area&gt; &lt;button&gt; &lt;input&gt; &lt;label&gt; &lt;select&gt; &lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onchange<\/td>\n<td><code>&lt;input&gt; &lt;select&gt; &lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onclick<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>ondblclick<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onfocus<\/td>\n<td><code>&lt;a&gt; &lt;area&gt; &lt;button&gt; &lt;input&gt; &lt;label&gt; &lt;select&gt; &lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onkeydown<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onkeypress<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onkeyup<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onload<\/td>\n<td><code>&lt;frameset&gt; &lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onmousedown<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onmousemove<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onmouseout<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onmouseover<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onmouseup<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>onreset<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onselect<\/td>\n<td><code>&lt;nput&gt;<\/code> <code>&lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onsubmit<\/td>\n<td><code>&lt;form&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>onunload<\/td>\n<td><code>&lt;frameset&gt; &lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>profile<\/td>\n<td><code>&lt;head&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>prompt<\/td>\n<td><code>&lt;bisindexody&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>readonly<\/td>\n<td><code>&lt;textarea&gt;<\/code> <code>&lt;input&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>rel<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;link&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>rev<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;link&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>rows<\/td>\n<td><code>&lt;frameset&gt;<\/code> <code>&lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>rowspan<\/td>\n<td><code>&lt;th&gt;<\/code> <code>&lt;td&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>rules<\/td>\n<td><code>&lt;table&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>scheme<\/td>\n<td><code>&lt;meta&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>scope<\/td>\n<td><code>&lt;th&gt;<\/code> <code>&lt;td&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>scrolling<\/td>\n<td><code>&lt;frame&gt;<\/code> <code>&lt;iframe&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>selected<\/td>\n<td><code>&lt;option&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>shape<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;area&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>size<\/td>\n<td><code>&lt;hr&gt; &lt;font&gt; &lt;input&gt; &lt;basefont&gt; &lt;select&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>span<\/td>\n<td><code>&lt;col&gt;<\/code> <code>&lt;colgroup&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>src<\/td>\n<td><code>&lt;script&gt; &lt;input&gt; &lt;frame&gt; &lt;iframe&gt; &lt;img&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>standby<\/td>\n<td><code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>start<\/td>\n<td><code>&lt;ol&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>style<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>summary<\/td>\n<td><code>&lt;table&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>tabindex<\/td>\n<td><code> &lt;a&gt; &lt;area&gt; &lt;button&gt; &lt;input&gt; &lt;object&gt; &lt;select&gt; &lt;textarea&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>target<\/td>\n<td><code>&lt;a&gt; &lt;area&gt; &lt;base&gt; &lt;form&gt; &lt;link&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>text<\/td>\n<td><code>&lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>title<\/td>\n<td>Most Elements<\/td>\n<\/tr>\n<tr>\n<td>type<\/td>\n<td><code>&lt;a&gt;<\/code> <code>&lt;link&gt;<\/code> <code>&lt;object&gt;<\/code> <code>&lt;param&gt;<\/code> <code>&lt;script&gt;<\/code> <code>&lt;style&gt;<\/code> <code>&lt;input&gt;<\/code> <code>&lt;li&gt; &lt;ol&gt; &lt;ul&gt; &lt;button&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>usemap<\/td>\n<td><code>&lt;img&gt;<\/code> <code>&lt;input&gt;<\/code> <code>&lt;object&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>valign<\/td>\n<td><code>&lt;col&gt; &lt;colgroup&gt; &lt;tbody&gt; &lt;td&gt; &lt;tfoot&gt; &lt;th&gt; &lt;thead&gt; &lt;tr&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>value<\/td>\n<td><code>&lt;input&gt; &lt;option&gt; &lt;param&gt; &lt;button&gt; &lt;li&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>valuetype<\/td>\n<td><code>&lt;param&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>version<\/td>\n<td><code>&lt;html&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>vlink<\/td>\n<td><code>&lt;body&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>vspace<\/td>\n<td><code>&lt;applet&gt;<\/code> <code>&lt;image&gt;<\/code> <code>&lt;object&gt; &lt;iframe&gt; &lt;img&gt; &lt;object&gt; &lt;table&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>width<\/td>\n<td><code>&lt;hr&gt; &lt;iframe&gt; &lt;img&gt; &lt;object&gt; &lt;table&gt; &lt;td&gt; &lt;th&gt; &lt;applet&gt; &lt;col&gt; &lt;colgroup&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>widthpre<\/td>\n<td><code>&lt;col&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>In HTML, each tag can have different attributes applied. Attributes allow the HTML tags to have specific properties added to them. You can assign a &#8220;class&#8221; to either reuse styles throughout your website or style your elements with the &#8220;style&#8221; attribute. Don&#8217;t worry about how the style and class attributes work at this moment, this<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\"> Read More ><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-947","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML Attributes: Using attributes in HTML tags<\/title>\n<meta name=\"description\" content=\"You can change the color in which text is displayed on your website. Learn how to style text using HTML.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Attributes: Using attributes in HTML tags\" \/>\n<meta property=\"og:description\" content=\"You can change the color in which text is displayed on your website. Learn how to style text using HTML.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-09-01T18:18:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:52:54+00:00\" \/>\n<meta name=\"author\" content=\"Brad Markle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Markle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"HTML Attributes: Using attributes in HTML tags\",\"datePublished\":\"2011-09-01T18:18:18+00:00\",\"dateModified\":\"2021-08-17T03:52:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\"},\"wordCount\":569,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\",\"name\":\"HTML Attributes: Using attributes in HTML tags\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2011-09-01T18:18:18+00:00\",\"dateModified\":\"2021-08-17T03:52:54+00:00\",\"description\":\"You can change the color in which text is displayed on your website. Learn how to style text using HTML.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Attributes: Using attributes in HTML tags\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\",\"name\":\"Brad Markle\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML Attributes: Using attributes in HTML tags","description":"You can change the color in which text is displayed on your website. Learn how to style text using HTML.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/","og_locale":"en_US","og_type":"article","og_title":"HTML Attributes: Using attributes in HTML tags","og_description":"You can change the color in which text is displayed on your website. Learn how to style text using HTML.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-09-01T18:18:18+00:00","article_modified_time":"2021-08-17T03:52:54+00:00","author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"HTML Attributes: Using attributes in HTML tags","datePublished":"2011-09-01T18:18:18+00:00","dateModified":"2021-08-17T03:52:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/"},"wordCount":569,"commentCount":3,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/","name":"HTML Attributes: Using attributes in HTML tags","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2011-09-01T18:18:18+00:00","dateModified":"2021-08-17T03:52:54+00:00","description":"You can change the color in which text is displayed on your website. Learn how to style text using HTML.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/basic-html-attributes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"HTML Attributes: Using attributes in HTML tags"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf","name":"Brad Markle","url":"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=947"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/947\/revisions"}],"predecessor-version":[{"id":86607,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/947\/revisions\/86607"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}