{"id":56,"date":"2022-03-19T09:30:21","date_gmt":"2022-03-19T09:30:21","guid":{"rendered":"https:\/\/staging.brightwhiz.com\/?post_type=topic&p=56"},"modified":"2024-02-26T10:59:20","modified_gmt":"2024-02-26T10:59:20","slug":"html-attributes","status":"publish","type":"topic","link":"http:\/\/local.tutorials\/topic\/html-attributes\/","title":{"rendered":"HTML – Attributes"},"content":{"rendered":"\n
So far we have mentioned HTML attributes quite a bit. This is the appropriate time to discuss these elements.<\/p>\n\n\n\n
HTML attributes can be used to provide additional characteristics or information about HTML elements.<\/p>\n\n\n\n
This is what you need to know about HTML attributes.<\/p>\n\n\n\n
In the HTML Basics chapter, we saw an example of a link that uses the The above element defines a hyperlink. The We will discuss more about links in our HTML Links chapter<\/a>.<\/p>\n\n\n\n The other example in the HTML basics used the The above example has four attributes explained below.<\/p>\n\n\n\n As always, we will discuss more about the Typically, you should always include the lang attribute inside the The example here specifies English as the web page language:<\/p>\n\n\n\n HTML supports country codes in the lang attribute where the first two characters define the language of the web page, and the last two characters define the country.<\/p>\n\n\n\n This example specifies English as the language and United States as the country:<\/p>\n\n\n\nhref<\/code> attribute of the
<a><\/code> element tag. Just to refresh your memory here it is again:<\/p>\n\n\n\n
<a href="https:\/\/brightwhiz.com">This is a link<\/a><\/code><\/pre>\n\n\n\n
href<\/code> attribute specifies the URL of the page the link jumps to which is specified as a value wrapped in quotes.<\/p>\n\n\n\n
<img><\/code> tag example see below.<\/p>\n\n\n\n
<img src="brightwhiz.jpg" alt="brightwhiz.com" width="320" height="270"><\/code><\/pre>\n\n\n\n
<img><\/code> tag in the HTML images chapter<\/a>.<\/p>\n\n\n\n
The lang Attribute<\/h2>\n\n\n\n
<html><\/code> tag. This tells the web browser and search engines what language the web page uses.<\/p>\n\n\n\n
<!DOCTYPE html>\n<html lang="en"> \t\n <body>\n ...\n <\/body>\t\n<\/html><\/code><\/pre>\n\n\n\n
<!DOCTYPE html>\n<html lang="en-US"> \t\n <body>\n ...\n <\/body>\t\n<\/html><\/code><\/pre>\n\n\n\n