CINXE.COM

Search | Treehouse Blog

<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title> Search | Treehouse Blog </title><link rel="preload" data-rocket-preload as="image" href="https://blog.teamtreehouse.com/wp-content/themes/treehouse-blog-reboot/img/header-bg.svg" fetchpriority="high"> <link rel="shortcut icon" href="https://teamtreehouse.com/assets/favicon.png" /> <script type="text/javascript"> /* <![CDATA[ */ (()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),function({ampUrl:n,isCustomizePreview:t,isAmpDevMode:r,noampQueryVarName:o,noampQueryVarValue:s,disabledStorageKey:i,mobileUserAgents:a,regexRegex:c}){if("undefined"==typeof sessionStorage)return;const d=new RegExp(c);if(!a.some((e=>{const n=e.match(d);return!(!n||!new RegExp(n[1],n[2]).test(navigator.userAgent))||navigator.userAgent.includes(e)})))return;e.g.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("amp-mobile-version-switcher");if(!e)return;e.hidden=!1;const n=e.querySelector("a[href]");n&&n.addEventListener("click",(()=>{sessionStorage.removeItem(i)}))}));const g=r&&["paired-browsing-non-amp","paired-browsing-amp"].includes(window.name);if(sessionStorage.getItem(i)||t||g)return;const u=new URL(location.href),m=new URL(n);m.hash=u.hash,u.searchParams.has(o)&&s===u.searchParams.get(o)?sessionStorage.setItem(i,"1"):m.href!==u.href&&(window.stop(),location.replace(m.href))}({"ampUrl":"https:\/\/blog.teamtreehouse.com\/search?amp=1","noampQueryVarName":"noamp","noampQueryVarValue":"mobile","disabledStorageKey":"amp_mobile_redirect_disabled","mobileUserAgents":["Mobile","Android","Silk\/","Kindle","BlackBerry","Opera Mini","Opera Mobi"],"regexRegex":"^\\\/((?:.|\\n)+)\\\/([i]*)$","isCustomizePreview":false,"isAmpDevMode":false})})(); /* ]]> */ </script> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <script data-cfasync="false" data-pagespeed-no-defer> var gtm4wp_datalayer_name = "dataLayer"; var dataLayer = dataLayer || []; </script> <!-- End Google Tag Manager for WordPress by gtm4wp.com --> <!-- This site is optimized with the Yoast SEO Premium plugin v24.5 (Yoast SEO v24.5) - https://yoast.com/wordpress/plugins/seo/ --> <meta name="description" content="Treehouse Blog search page. Use the search function to find articles that you are looking for. You can also search by topics." /> <link rel="canonical" href="https://blog.teamtreehouse.com/search" /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="article" /> <meta property="og:title" content="Search" /> <meta property="og:description" content="Treehouse Blog search page. Use the search function to find articles that you are looking for. You can also search by topics." /> <meta property="og:url" content="https://blog.teamtreehouse.com/search" /> <meta property="og:site_name" content="Treehouse Blog" /> <meta property="article:publisher" content="https://www.facebook.com/TeamTreehouse/" /> <meta property="article:modified_time" content="2022-02-25T15:34:00+00:00" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@treehouse" /> <!-- / Yoast SEO Premium plugin. --> <link rel='dns-prefetch' href='//cdn.fonts.net' /> <link rel="alternate" type="application/rss+xml" title="Treehouse Blog &raquo; Feed" href="https://blog.teamtreehouse.com/feed" /> <link rel="alternate" type="application/rss+xml" title="Treehouse Blog &raquo; Comments Feed" href="https://blog.teamtreehouse.com/comments/feed" /> <link rel="alternate" type="application/rss+xml" title="Treehouse Blog &raquo; Search Comments Feed" href="https://blog.teamtreehouse.com/search/feed" /> <style id='wp-emoji-styles-inline-css' type='text/css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='wp-block-library-css' href='https://blog.teamtreehouse.com/wp-includes/css/dist/block-library/style.min.css?ver=6.7.1' type='text/css' media='all' /> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css' type='text/css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='toc-screen-css' href='https://blog.teamtreehouse.com/wp-content/plugins/table-of-contents-plus/screen.min.css?ver=2411.1' type='text/css' media='all' /> <link rel='stylesheet' id='ppress-frontend-css' href='https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/css/frontend.min.css?ver=4.15.21' type='text/css' media='all' /> <link rel='stylesheet' id='ppress-flatpickr-css' href='https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.css?ver=4.15.21' type='text/css' media='all' /> <link rel='stylesheet' id='ppress-select2-css' href='https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.css?ver=6.7.1' type='text/css' media='all' /> <link rel='stylesheet' id='font-css' href='//cdn.fonts.net/kit/39d0ab8f-c2d6-48ee-8a04-732fec352d95/39d0ab8f-c2d6-48ee-8a04-732fec352d95.css?ver=6.7.1' type='text/css' media='all' /> <link rel='stylesheet' id='custom-css' href='https://blog.teamtreehouse.com/wp-content/themes/treehouse-blog-reboot/css/all.css?ver=6.7.1' type='text/css' media='all' /> <style id='akismet-widget-style-inline-css' type='text/css'> .a-stats { --akismet-color-mid-green: #357b49; --akismet-color-white: #fff; --akismet-color-light-grey: #f6f7f7; max-width: 350px; width: auto; } .a-stats * { all: unset; box-sizing: border-box; } .a-stats strong { font-weight: 600; } .a-stats a.a-stats__link, .a-stats a.a-stats__link:visited, .a-stats a.a-stats__link:active { background: var(--akismet-color-mid-green); border: none; box-shadow: none; border-radius: 8px; color: var(--akismet-color-white); cursor: pointer; display: block; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif; font-weight: 500; padding: 12px; text-align: center; text-decoration: none; transition: all 0.2s ease; } /* Extra specificity to deal with TwentyTwentyOne focus style */ .widget .a-stats a.a-stats__link:focus { background: var(--akismet-color-mid-green); color: var(--akismet-color-white); text-decoration: none; } .a-stats a.a-stats__link:hover { filter: brightness(110%); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.16); } .a-stats .count { color: var(--akismet-color-white); display: block; font-size: 1.5em; line-height: 1.4; padding: 0 13px; white-space: nowrap; } </style> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.js?ver=4.15.21" id="ppress-flatpickr-js"></script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.js?ver=4.15.21" id="ppress-select2-js"></script> <script type="text/javascript"> !function(){var analytics=window.analytics=window.analytics||[];if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.0"; window.analytics.load("DMUKccVYvuuUIVSJlokCJe0YQyGm9qVb"); window.analytics.page(); }}(); </script> <link rel="https://api.w.org/" href="https://blog.teamtreehouse.com/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://blog.teamtreehouse.com/wp-json/wp/v2/pages/25237" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.teamtreehouse.com/xmlrpc.php?rsd" /> <link rel='shortlink' href='https://blog.teamtreehouse.com/?p=25237' /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://blog.teamtreehouse.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.teamtreehouse.com%2Fsearch" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://blog.teamtreehouse.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.teamtreehouse.com%2Fsearch&#038;format=xml" /> <!-- This site is optimized with the Schema plugin v1.7.9.6 - https://schema.press --> <script type="application/ld+json">{"@context":"https:\/\/schema.org\/","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https:\/\/blog.teamtreehouse.com\/search"},"url":"https:\/\/blog.teamtreehouse.com\/search","headline":"Search","datePublished":"2015-08-03T15:38:25-07:00","dateModified":"2022-02-25T07:34:00-08:00","publisher":{"@type":"Organization","@id":"https:\/\/blog.teamtreehouse.com\/#organization","name":"Treehouse","logo":{"@type":"ImageObject","url":"https:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2018\/08\/treehouse-logo_green.png","width":600,"height":60}},"author":{"@type":"Person","name":"Chris Michel","url":"https:\/\/blog.teamtreehouse.com\/author\/hatefulcrawdad","description":"Chris Michel is a Designer at Treehouse, California boy, and lover of all things Sass.","image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/cf24547211684696f9fbeda2023dead2?s=96&d=blank&r=g","height":96,"width":96},"sameAs":["https:\/\/twitter.com\/hatefulcrawdad"]}}</script> <link rel="alternate" type="text/html" media="only screen and (max-width: 640px)" href="https://blog.teamtreehouse.com/search?amp=1"> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <!-- GTM Container placement set to automatic --> <script data-cfasync="false" data-pagespeed-no-defer> var dataLayer_content = {"pagePostType":"page","pagePostType2":"single-page","pagePostAuthor":"Chris Michel"}; dataLayer.push( dataLayer_content ); </script> <script data-cfasync="false"> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PZ55S7'); </script> <!-- End Google Tag Manager for WordPress by gtm4wp.com --><link rel="amphtml" href="https://blog.teamtreehouse.com/search?amp=1"><style>#amp-mobile-version-switcher{left:0;position:absolute;width:100%;z-index:100}#amp-mobile-version-switcher>a{background-color:#444;border:0;color:#eaeaea;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;font-weight:600;padding:15px 0;text-align:center;-webkit-text-decoration:none;text-decoration:none}#amp-mobile-version-switcher>a:active,#amp-mobile-version-switcher>a:focus,#amp-mobile-version-switcher>a:hover{-webkit-text-decoration:underline;text-decoration:underline}</style><link rel="icon" href="https://blog.teamtreehouse.com/wp-content/uploads/2018/08/favicon.png" sizes="32x32" /> <link rel="icon" href="https://blog.teamtreehouse.com/wp-content/uploads/2018/08/favicon.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://blog.teamtreehouse.com/wp-content/uploads/2018/08/favicon.png" /> <meta name="msapplication-TileImage" content="https://blog.teamtreehouse.com/wp-content/uploads/2018/08/favicon.png" /> <style type="text/css" id="wp-custom-css"> .blog-post { margin: 0 !important; width: inherit; } .blog-comments { margin: 0 !important; width: inherit; } .techdegree-cta-generic-wrapper { max-width: 984px; /*height: 294px;*/ display: flex; align-items: center; margin: 50px auto; } .techdegree-cta-generic-container-right img { max-width: 255px !important; max-height: 255px !important; border: none !important; } .techdegree-cta-generic-container-right-v2 img { border: none !important; } .techdegree-cta-generic-container-left { padding-left: 20px; width: 57% } .techdegree-cta-generic-text-heading { margin: 0; color: #fff; font-size: 30px !important; line-height: 30px; } .techdegree-cta-generic-text { font-size: 16px; font-weight: 500; line-height: 19px; color: #fff; } .techdegree-cta-button { background: #fff; width: 231px; height: 49px; border: none; line-height: 29px; font-size: 19px; font-weight: 500; } .topic-javascript { color: #133EA2; } .topic-javascript:hover { background: #133EA2; color: #fff !important; } .topic-design { color: #4A4290; } .topic-design:hover { background: #4A4290; color: #fff !important; } .topic-python { color: #0E8397; } .topic-python:hover { background: #0E8397; color: #fff !important; } .topic-data { color: #944F81; } .topic-data:hover { background: #944F81; color: #fff !important; } .topic-python { color: #0E8397; } .topic-python:hover { background: #0E8397; color: #fff !important; } @media screen and (max-width: 1130px) { .techdegree-cta-generic-wrapper { height: 219px; } .techdegree-cta-generic-text-heading { width: 65% !important; margin: 0 auto; font-size: 16px !important; line-height: 19.2px; } .techdegree-cta-generic-text { width: 70%; margin: 15px auto; font-size: 10px; line-height: 12px; } .techdegree-cta-generic-container-right { display: none; } .techdegree-cta-generic-container-right-v2 { display: none; } .techdegree-cta-generic-container-left { width: 100%; padding-left: 0; text-align: center; } .techdegree-cta-button { height: 32px; width: 157px; font-size: 12px; line-height: 13.46px; } } /* Image borders - remove */ img[class*="align"], img[class*="wp-image-"], #content .gallery .gallery-icon img { border: none; } @media screen and (max-width: 400px) { .techdegree-cta-generic-text { width: 75%; } } .wp-block-image :where(figcaption) { text-align: center; font-size: 16px; } </style> <script>var $ = jQuery.noConflict();</script> <!-- OneTrust Cookies Consent Notice (Production Standard, teamtreehouse.com, en-GB) start --> <script src="https://optanon.blob.core.windows.net/consent/39d1ae64-085b-42e6-a239-a988d6530b80.js" type="text/javascript" charset="UTF-8"></script> <script type="text/javascript"> function OptanonWrapper() { window.dataLayer.push({ event: "OneTrustGroupsUpdated" }) } </script> <!-- OneTrust Cookies Consent Notice (Production Standard, teamtreehouse.com, en-GB) end --> <script type="text/plain" class="optanon-category-3"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-25670760-10']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/plain" class="optanon-category-4"> /* <![CDATA[ */ var google_conversion_id = 1017883234; var google_conversion_label = "hbMzCI7rvAMQ4tSu5QM"; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; /* ]]> */ </script> <script src="//www.googleadservices.com/pagead/conversion.js" type="text/plain" class="optanon-category-4"> // here ends google retargeting </script> <!-- Start Eloqua alena --> <script type="text/javascript"> window._elqQ = []; function _elqInitialize() { if(!window._elqInitialized) { window._elqInitialized = true; _elqQ.push(['elqSetSiteId', '1855842777']); var s = document.createElement('script'); s.type = 'text/javascript'; s.src = '//img04.en25.com/i/elqCfg.min.js'; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } }; </script> <script type="text/plain" class="optanon-category-2"> _elqInitialize(); </script> <script type="text/plain" class="optanon-category-4"> _elqInitialize(); _elqQ.push(['elqTrackPageView']); </script> </head> <body class="page-template-default page page-id-25237"> <!-- GTM Container placement set to automatic --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PZ55S7" height="0" width="0" style="display:none;visibility:hidden" aria-hidden="true"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <nav> <section> <a href="https://teamtreehouse.com" class="brand"> <svg class="treehouse-icon" viewBox="0 0 139 32" preserveAspectRatio="xMinYMin meet"> <g> <path class="icon-treehouse" d="M42.8,21c-0.4,0.1-0.9,0.2-1.4,0.2c-1,0-1.4-0.6-1.4-1.6v-4.5h2.8c0.7,0,1.4-0.5,1.4-1.3s-0.6-1.3-1.4-1.3 H40V11c0-0.9-0.7-1.5-1.5-1.5S37,10.2,37,11v8.7c0,2.5,1.2,4.3,4,4.3c0.8,0,1.9-0.1,2.7-0.5c0.7-0.3,0.9-0.8,0.9-1.3 C44.6,21.5,43.9,20.8,42.8,21z M52.8,12.1c-0.4-0.1-1.2-0.2-1.9-0.2c-2.5,0-3.9,1.5-3.9,3.8v6.8c0,0.8,0.7,1.5,1.5,1.5 s1.5-0.7,1.5-1.5v-6.2c0-1,0.4-1.4,1.1-1.4c0.7,0,1.1,0.2,1.7,0.2c0.9,0,1.4-0.8,1.4-1.4C54.1,12.9,53.7,12.4,52.8,12.1z M61.1,11.9 c-2.8,0-4.8,1.8-5.1,4.7c0,0.7-0.1,1.9,0,2.8c0.2,2.8,2.2,4.7,5.2,4.7c1.4,0,2.7-0.3,3.5-0.8c0.6-0.4,0.7-0.8,0.7-1.2 c0-0.8-0.7-1.6-1.9-1.2c-0.7,0.3-1.5,0.5-2.3,0.5c-1.4,0-2.5-0.7-2.5-2.1V19h5.7c1,0,1.5-0.6,1.5-1.5V17C66,13.9,64,11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https://teamtreehouse.com/subscribe/plans?trial=yes&cid=3842">Learn to code.<span> Start your free trial with Treehouse.</span></a> <ul class="nav-list"> <li class="nav-item current"> <a href="https://blog.teamtreehouse.com/search" class="nav-anchor search"> <svg viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet"> <path id="XMLID_3_" fill="none" d="M15.8,9.2C15.8,5.8,13,3,9.6,3C6.1,3,3.4,5.8,3.4,9.2c0,3.4,2.8,6.2,6.2,6.2 C13,15.4,15.8,12.6,15.8,9.2z"/> <path id="XMLID_10_" d="M23.2,21.4L16.7,15c1.3-1.6,2-3.6,2-5.8c0-5.1-4.1-9.2-9.2-9.2C4.5,0,0.4,4.1,0.4,9.2 c0,5.1,4.1,9.2,9.2,9.2c1.8,0,3.5-0.5,4.9-1.4l6.6,6.6c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4C23.8,23,23.8,22,23.2,21.4z M3.4,9.2C3.4,5.8,6.1,3,9.6,3c3.4,0,6.2,2.8,6.2,6.2c0,3.4-2.8,6.2-6.2,6.2C6.1,15.4,3.4,12.6,3.4,9.2z"/> </svg> </a> </li> <li class="nav-item "> <a href="https://blog.teamtreehouse.com" class="nav-anchor">Home</a> </li> <li class="nav-item nav-item-free-trial"> <a href="https://teamtreehouse.com/subscribe/plans?trial=yes&cid=3842" class="nav-anchor">Free trial</a> </li> </ul> </section> </nav> <!-- Admin Nav --> <div class="page-container"> <header> <section> <h1>Search</h1> </section> </header> <div class="sticky-subnav"> <div class="row"> <div class="twelve columns"> <ul class="sticky-subnav-list"> <li class="cat-item cat-item-2616"><a href="https://blog.teamtreehouse.com/category/ai">AI</a> </li> <li class="cat-item cat-item-1541"><a href="https://blog.teamtreehouse.com/category/teams">Business Resources</a> </li> <li class="cat-item cat-item-2042"><a href="https://blog.teamtreehouse.com/category/career-advice">Career Advice</a> </li> <li class="cat-item cat-item-2617"><a href="https://blog.teamtreehouse.com/category/chatgpt">ChatGPT</a> </li> <li class="cat-item cat-item-1313"><a href="https://blog.teamtreehouse.com/category/community">Community</a> </li> <li class="cat-item cat-item-1311"><a href="https://blog.teamtreehouse.com/category/learn">Learn</a> </li> <li class="cat-item cat-item-2054"><a href="https://blog.teamtreehouse.com/category/treehouse-podcast">Podcast</a> </li> <li class="cat-item cat-item-2620"><a href="https://blog.teamtreehouse.com/category/productivity">Productivity</a> </li> <li class="cat-item cat-item-1320"><a href="https://blog.teamtreehouse.com/category/treehouse-news">Treehouse News</a> </li> </ul> </div> </div> </div> <section class="page-content"> <div class="row"> <div class="skinny-read"> <div class="search-box"> <form id="searchBox" role="search" method="get" class="search-form" action="https://blog.teamtreehouse.com/"> <p> <input type="search" autofocus class="search-field" value="" name="s" id="s" title="Search for:" /> <label for="s"><small>Search by keyword</small></label> </p> </form> </div> <ul class="search-by-group topic"> <h3>Search topics</h3> <li><a href="https://blog.teamtreehouse.com/?s=HTML" class="button small html">HTML</a></li> <li><a href="https://blog.teamtreehouse.com/?s=CSS" class="button small css">CSS</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Design" class="button small design">Design</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Javascript" class="button small javascript">Javascript</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Ruby" class="button small ruby">Ruby</a></li> <li><a href="https://blog.teamtreehouse.com/?s=PHP" class="button small php">PHP</a></li> <li><a href="https://blog.teamtreehouse.com/?s=WordPress" class="button small wordpress">WordPress</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Development-tools" class="button small development-tools">Development Tools</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Business" href="" class="button small business">Business</a></li> <li><a href="https://blog.teamtreehouse.com/?s=iOS" class="button small ios">iOS</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Android" href="" class="button small android">Android</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Python" class="button small python">Python</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Java" class="button small java">Java</a></li> <li><a href="https://blog.teamtreehouse.com/?s=Digital-literacy" class="button small digital-literacy">Digital Literacy</a></li> </ul> </div> </div> </section> <section class="treehouse-ad post-25237 page type-page status-publish hentry"> <div class="row"> <div class="skinny-read"> <div class="block"> <img src="https://blog.teamtreehouse.com/wp-content/themes/treehouse-blog-reboot/img/treehouse-ads/web-design.png" alt="" /> </div> <div class="block"> <h2> Learning to code can be fun! </h2> <p> Get started today with a free trial and discover why thousands of students are choosing Treehouse to learn about web development, design, and business. </p> <a href=" https://teamtreehouse.com/subscribe/plans?trial=yes&cid=4042 " class="button secondary">Learn more</a> </div> </div> </div> </section> <section> <footer id="footer"> <div class="treehouse-typelockup"></div> <p> &copy;2025 Treehouse Island, Inc. <br> <br> <a href="https://teamtreehouse.com/about">About</a> &bull; <a href="https://teamtreehouse.com/jobs">Careers</a> &bull; <a href="https://blog.teamtreehouse.com">Blog</a> &bull; <a href="https://teamtreehouse.com/affiliate-program">Affiliate Program</a> &bull; <a href="https://teamtreehouse.com/terms">Terms</a> &bull; <a href="https://teamtreehouse.com/privacy">Privacy</a> &bull; <a href="https://teamtreehouse.com/support">Contact</a> </p> <ul class="social"> <li><a href="https://twitter.com/treehouse" class="twitter"></a></li> <li><a href="https://youtube.com/gotreehouse" class="youtube"></a></li> <li><a href="https://facebook.com/teamtreehouse" class="facebook"></a></li> <li><a href="https://linkedin.com/company/treehouse-island-inc-" class="linkedin"></a></li> <li><a href="https://instagram.com/teamtreehouse" class="instagram"></a></li> </ul> <div class="stripes"></div> </footer> </section> <script type="text/javascript"> analytics.track("Viewed Search Page", {"noninteraction":true}, {"library":"analytics-wordpress"}); </script> <div id="amp-mobile-version-switcher" hidden> <a rel="" href="https://blog.teamtreehouse.com/search?amp=1"> Go to mobile version </a> </div> <script type="text/javascript" id="toc-front-js-extra"> /* <![CDATA[ */ var tocplus = {"smooth_scroll":"1","visibility_show":"show","visibility_hide":"hide","visibility_hide_by_default":"1","width":"Auto"}; /* ]]> */ </script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/plugins/table-of-contents-plus/front.min.js?ver=2411.1" id="toc-front-js"></script> <script type="text/javascript" id="ppress-frontend-script-js-extra"> /* <![CDATA[ */ var pp_ajax_form = {"ajaxurl":"https:\/\/blog.teamtreehouse.com\/wp-admin\/admin-ajax.php","confirm_delete":"Are you sure?","deleting_text":"Deleting...","deleting_error":"An error occurred. Please try again.","nonce":"35915082b9","disable_ajax_form":"false","is_checkout":"0","is_checkout_tax_enabled":"0","is_checkout_autoscroll_enabled":"true"}; /* ]]> */ </script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/plugins/wp-user-avatar/assets/js/frontend.min.js?ver=4.15.21" id="ppress-frontend-script-js"></script> <script type="text/javascript" id="rocket-browser-checker-js-after"> /* <![CDATA[ */ "use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var RocketBrowserCompatibilityChecker=function(){function RocketBrowserCompatibilityChecker(options){_classCallCheck(this,RocketBrowserCompatibilityChecker),this.passiveSupported=!1,this._checkPassiveOption(this),this.options=!!this.passiveSupported&&options}return _createClass(RocketBrowserCompatibilityChecker,[{key:"_checkPassiveOption",value:function(self){try{var options={get passive(){return!(self.passiveSupported=!0)}};window.addEventListener("test",null,options),window.removeEventListener("test",null,options)}catch(err){self.passiveSupported=!1}}},{key:"initRequestIdleCallback",value:function(){!1 in window&&(window.requestIdleCallback=function(cb){var start=Date.now();return setTimeout(function(){cb({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)}),!1 in window&&(window.cancelIdleCallback=function(id){return clearTimeout(id)})}},{key:"isDataSaverModeOn",value:function(){return"connection"in navigator&&!0===navigator.connection.saveData}},{key:"supportsLinkPrefetch",value:function(){var elem=document.createElement("link");return elem.relList&&elem.relList.supports&&elem.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype}},{key:"isSlowConnection",value:function(){return"connection"in navigator&&"effectiveType"in navigator.connection&&("2g"===navigator.connection.effectiveType||"slow-2g"===navigator.connection.effectiveType)}}]),RocketBrowserCompatibilityChecker}(); /* ]]> */ </script> <script type="text/javascript" id="rocket-preload-links-js-extra"> /* <![CDATA[ */ var RocketPreloadLinksConfig = {"excludeUris":"\/(?:.+\/)?feed(?:\/(?:.+\/?)?)?$|\/(?:.+\/)?embed\/|\/(index.php\/)?(.*)wp-json(\/.*|$)|\/refer\/|\/go\/|\/recommend\/|\/recommends\/","usesTrailingSlash":"","imageExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php","fileExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php|html|htm","siteUrl":"https:\/\/blog.teamtreehouse.com","onHoverDelay":"100","rateThrottle":"3"}; /* ]]> */ </script> <script type="text/javascript" id="rocket-preload-links-js-after"> /* <![CDATA[ */ (function() { "use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var t=function(){function n(e,t){i(this,n),this.browser=e,this.config=t,this.options=this.browser.options,this.prefetched=new Set,this.eventTime=null,this.threshold=1111,this.numOnHover=0}return e(n,[{key:"init",value:function(){!this.browser.supportsLinkPrefetch()||this.browser.isDataSaverModeOn()||this.browser.isSlowConnection()||(this.regex={excludeUris:RegExp(this.config.excludeUris,"i"),images:RegExp(".("+this.config.imageExt+")$","i"),fileExt:RegExp(".("+this.config.fileExt+")$","i")},this._initListeners(this))}},{key:"_initListeners",value:function(e){-1<this.config.onHoverDelay&&document.addEventListener("mouseover",e.listener.bind(e),e.listenerOptions),document.addEventListener("mousedown",e.listener.bind(e),e.listenerOptions),document.addEventListener("touchstart",e.listener.bind(e),e.listenerOptions)}},{key:"listener",value:function(e){var t=e.target.closest("a"),n=this._prepareUrl(t);if(null!==n)switch(e.type){case"mousedown":case"touchstart":this._addPrefetchLink(n);break;case"mouseover":this._earlyPrefetch(t,n,"mouseout")}}},{key:"_earlyPrefetch",value:function(t,e,n){var i=this,r=setTimeout(function(){if(r=null,0===i.numOnHover)setTimeout(function(){return i.numOnHover=0},1e3);else if(i.numOnHover>i.config.rateThrottle)return;i.numOnHover++,i._addPrefetchLink(e)},this.config.onHoverDelay);t.addEventListener(n,function e(){t.removeEventListener(n,e,{passive:!0}),null!==r&&(clearTimeout(r),r=null)},{passive:!0})}},{key:"_addPrefetchLink",value:function(i){return this.prefetched.add(i.href),new Promise(function(e,t){var n=document.createElement("link");n.rel="prefetch",n.href=i.href,n.onload=e,n.onerror=t,document.head.appendChild(n)}).catch(function(){})}},{key:"_prepareUrl",value:function(e){if(null===e||"object"!==(void 0===e?"undefined":r(e))||!1 in e||-1===["http:","https:"].indexOf(e.protocol))return null;var t=e.href.substring(0,this.config.siteUrl.length),n=this._getPathname(e.href,t),i={original:e.href,protocol:e.protocol,origin:t,pathname:n,href:t+n};return this._isLinkOk(i)?i:null}},{key:"_getPathname",value:function(e,t){var n=t?e.substring(this.config.siteUrl.length):e;return n.startsWith("/")||(n="/"+n),this._shouldAddTrailingSlash(n)?n+"/":n}},{key:"_shouldAddTrailingSlash",value:function(e){return this.config.usesTrailingSlash&&!e.endsWith("/")&&!this.regex.fileExt.test(e)}},{key:"_isLinkOk",value:function(e){return null!==e&&"object"===(void 0===e?"undefined":r(e))&&(!this.prefetched.has(e.href)&&e.origin===this.config.siteUrl&&-1===e.href.indexOf("?")&&-1===e.href.indexOf("#")&&!this.regex.excludeUris.test(e.href)&&!this.regex.images.test(e.href))}}],[{key:"run",value:function(){"undefined"!=typeof RocketPreloadLinksConfig&&new n(new RocketBrowserCompatibilityChecker({capture:!0,passive:!0}),RocketPreloadLinksConfig).init()}}]),n}();t.run(); }()); /* ]]> */ </script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/themes/treehouse-blog-reboot/js/vendor/jquery.fitvids.js?ver=1.1" id="fitvid-script-js"></script> <script type="text/javascript" src="https://blog.teamtreehouse.com/wp-content/themes/treehouse-blog-reboot/js/main.js?ver=1.0.0" id="main-script-js"></script> </div> <!-- / .page-container --> </body> </html> <!-- This website is like a Rocket, isn't it? Performance optimized by WP Rocket. Learn more: https://wp-rocket.me -->

Pages: 1 2 3 4 5 6 7 8 9 10