{"id":1504,"date":"2018-02-14T16:41:25","date_gmt":"2018-02-14T21:41:25","guid":{"rendered":"http:\/\/bluegalaxy.info\/codewalk\/?p=1504"},"modified":"2018-04-05T18:46:34","modified_gmt":"2018-04-05T23:46:34","slug":"html-get-vector-icon-images-web-page-using-font-awesome","status":"publish","type":"post","link":"https:\/\/bluegalaxy.info\/codewalk\/2018\/02\/14\/html-get-vector-icon-images-web-page-using-font-awesome\/","title":{"rendered":"HTML: How to get vector icon images into your web page using Font Awesome"},"content":{"rendered":"<p>FontAwesome is a website where you can get free vector Icon images for your website. As described on their &#8220;get-started&#8221; page, they offer a CDN (Content Delivery Network) URL that you can place into your web page and the SVG icons will be loaded asynchronously into the page:<br \/>\n<a href=\"https:\/\/fontawesome.com\/get-started\">https:\/\/fontawesome.com\/get-started<\/a><\/p>\n<p>Here is what the CDN would look like inside the HEAD portion of your web page code:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">&lt;script defer src=\"https:\/\/use.fontawesome.com\/releases\/v5.0.6\/js\/all.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>Once the CDN is placed, go to the Icons page on their website and choose the Icons you want to use. For example, let&#8217;s say you want to use the &#8220;at&#8221; symbol.<br \/>\n<a href=\"https:\/\/fontawesome.com\/icons\/at?style=solid\">https:\/\/fontawesome.com\/icons\/at?style=solid<\/a><\/p>\n<p>This page will have a bit of code that you can use in your HTML that corresponds to their CSS. For example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">&lt;i class=\"fas fa-at\"&gt;&lt;\/i&gt;<\/pre>\n<p>There are class tags that allow you to change the sizes of the icons as well. For example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1508 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_sizes.jpg\" alt=\"\" width=\"471\" height=\"373\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_sizes.jpg 471w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_sizes-300x238.jpg 300w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>Here is another example of using Font Awesome Icons in a web project:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">&lt;!-- Boxes section --&gt;\r\n&lt;section class=\"boxes\"&gt;\r\n&lt;div class=\"box\"&gt;\r\n  &lt;i class=\"fas fa-chart-pie fa-4x\"&gt;&lt;\/i&gt;\r\n  &lt;h3&gt;Analytics&lt;\/h3&gt;\r\n  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;div class=\"box\"&gt;\r\n  &lt;i class=\"fas fa-globe fa-4x\"&gt;&lt;\/i&gt;\r\n  &lt;h3&gt;Marketing&lt;\/h3&gt;\r\n  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;div class=\"box\"&gt;\r\n  &lt;i class=\"fas fa-cog fa-4x\"&gt;&lt;\/i&gt;\r\n  &lt;h3&gt;Development&lt;\/h3&gt;\r\n  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;div class=\"box\"&gt;\r\n  &lt;i class=\"fas fa-users fa-4x\"&gt;&lt;\/i&gt;\r\n  &lt;h3&gt;Support&lt;\/h3&gt;\r\n  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;\/section&gt;<\/pre>\n<p>Which yields:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1511 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_example.jpg\" alt=\"\" width=\"443\" height=\"644\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_example.jpg 443w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2018\/02\/fa_example-206x300.jpg 206w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/p>\n<p>For more information on how to use Font Awesome, see:<br \/>\n<a href=\"https:\/\/fontawesome.com\/how-to-use\/svg-with-js\">https:\/\/fontawesome.com\/how-to-use\/svg-with-js<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FontAwesome is a website where you can get free vector Icon images for your website. As described on their &#8220;get-started&#8221; page, they offer a CDN (Content Delivery Network) URL that you can place into your web page and the SVG icons will be loaded asynchronously into the page: https:\/\/fontawesome.com\/get-started Here is what the CDN would &hellip; <a href=\"https:\/\/bluegalaxy.info\/codewalk\/2018\/02\/14\/html-get-vector-icon-images-web-page-using-font-awesome\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HTML: How to get vector icon images into your web page using Font Awesome<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[10,122,105],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-html-css","tag-css","tag-font-awesome","tag-html"],"_links":{"self":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/comments?post=1504"}],"version-history":[{"count":5,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1512,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1504\/revisions\/1512"}],"wp:attachment":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}