A basic <figure> and <figcaption> example using images
An example to demonstrate the use of figure and figcaption with code
function NavigatorExample(){ var txt; txt = "Browser CodeName: " + navigator.appCodeName; txt+= "Browser Name: " + navigator.appName; txt+= "Browser Version: " + navigator.appVersion ; txt+= "Cookies Enabled: " + navigator.cookieEnabled; txt+= "Platform: " + navigator.platform; txt+= "User-agent header: " + navigator.userAgent; }
Quotes, parts of poems can also be a part of figure
"If debugging is the process of removing software bugs,
then programming must be the process of putting them in"
The above examples have <figcaption> as the first element of <figure> so now we will try it being the last element as w3c recommends it can be either first or last element of <figure>
A basic <figure> and <figcaption> example using images
An example to demonstrate the use of figure and figcaption with code
function NavigatorExample(){ var txt; txt = "Browser CodeName: " + navigator.appCodeName; txt+= "Browser Name: " + navigator.appName; txt+= "Browser Version: " + navigator.appVersion ; txt+= "Cookies Enabled: " + navigator.cookieEnabled; txt+= "Platform: " + navigator.platform; txt+= "User-agent header: " + navigator.userAgent; }
Quotes, parts of poems can also be a part of figure
"If debugging is the process of removing software bugs,
then programming must be the process of putting them in"