<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Bootstrap 5 - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Bootstrap 5 - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 05:06:09 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/bootstrap-5/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Create a Landing Page with Bootstrap 5 and Context7 MCP AI ]]>
                </title>
                <description>
                    <![CDATA[ What if you could build a responsive and stunning landing page in minutes, with little to no coding? Well, AI tools like Context7 MCP make it possible to automate design tasks and seamlessly integrate them with powerful frameworks like Bootstrap 5. I... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/create-a-landing-page-with-bootstrap-5-and-context7-mcp-ai/</link>
                <guid isPermaLink="false">68e413e6f01f4d585b1f9e1b</guid>
                
                    <category>
                        <![CDATA[ Bootstrap ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Bootstrap 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abhijeet Dave ]]>
                </dc:creator>
                <pubDate>Mon, 06 Oct 2025 19:09:26 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1759776218071/dce01b69-3ae9-46da-b4a4-e9a98e42f5d1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>What if you could build a responsive and stunning landing page in minutes, with little to no coding? Well, AI tools like Context7 MCP make it possible to automate design tasks and seamlessly integrate them with powerful frameworks like Bootstrap 5.</p>
<p>In this article, you’ll learn how to effortlessly create a modern and responsive landing page using Context7 MCP and Bootstrap 5 by simply providing prompts - no expert coding required!</p>
<p>Landing pages are the cornerstone of online success. They directly influence conversion rates and play a crucial role in lead generation. But creating an effective landing page that looks great across all devices can be a daunting task. That’s where AI-powered tools can help, making it easier than ever to build a landing page that’s both visually appealing and responsive.</p>
<h2 id="heading-table-of-content">Table of Content</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-prerequisites">Prerequisites</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-leveraging-ai-for-bootstrap-5-landing-page-code-generation">Leveraging AI for Bootstrap 5 Landing Page Code Generation</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-bootstrap">What is Bootstrap?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-mcp">What is MCP?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-basic-use-case-of-context7-in-mcp-for-bootstrap">Basic Use Case of Context7 in MCP for Bootstrap</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-use-context7-mcp-for-optimal-results-with-bootstrap-5">How to Use Context7 MCP for Optimal Results with Bootstrap 5</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-by-step-build-ai-powered-landing-page-with-bootstrap-5-and-context7-mcp">Step-by-Step Build: AI-Powered Landing Page with Bootstrap 5 and Context7 MCP</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-set-up-context7-mcp-in-vs-code">How to Set Up Context7 MCP in VS Code</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-instructions-for-content-generation-and-confirmation-process">Instructions for Content Generation and Confirmation Process</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-methods-for-building-a-landing-page-with-ai">Methods for Building a Landing Page with AI</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>Before diving into the tutorial, make sure you have the following:</p>
<ul>
<li><p>Basic understanding of HTML, CSS, and JavaScript.</p>
</li>
<li><p>Bootstrap 5: Familiarity with this front-end framework is essential.</p>
</li>
<li><p>VS Code: A modern code editor like Visual Studio Code.</p>
</li>
<li><p>Node.js: Installed to run server-side operations.</p>
</li>
<li><p>Context7 MCP: A basic understanding of this AI-driven tool for managing design systems.</p>
</li>
</ul>
<h2 id="heading-leveraging-ai-for-bootstrap-5-landing-page-code-generation">Leveraging AI for Bootstrap 5 Landing Page Code Generation</h2>
<p>Building a landing page traditionally requires crafting HTML and CSS from scratch, which can be labor-intensive and prone to inconsistencies. That’s where AI can be helpful.</p>
<p>Tools like Context7 MCP &amp; VS Code complement this workflow by accelerating the process: with a simple prompt such as “feature card with icon and button,” it produces ready-to-use code snippets that integrate seamlessly with Bootstrap 5’s grid system and styling principles.</p>
<p>This allows developers to iterate quickly, refine their designs, and allocate more effort toward unique content and user-centric refinements.</p>
<h3 id="heading-benefits-of-using-ai-for-bootstrap-code-generation">Benefits of Using AI for Bootstrap Code Generation:</h3>
<ol>
<li><p><strong>Speed</strong>: Generate responsive, well-structured code in seconds.</p>
</li>
<li><p><strong>Efficiency</strong>: Automates boilerplate code, letting developers focus on higher-level tasks.</p>
</li>
<li><p><strong>Consistency</strong>: Ensures all generated components align with Bootstrap’s standards.</p>
</li>
<li><p><strong>Customization</strong>: Provides flexibility to tailor components to your needs.</p>
</li>
<li><p><strong>Improved and Up-to-Date AI-Generated Code</strong>: The AI follows structured guidelines, ensuring the generated code is current and accurate.</p>
</li>
</ol>
<h3 id="heading-how-ai-revolutionizes-bootstrap-development">How AI Revolutionizes Bootstrap Development</h3>
<p>AI-driven tools like Context7 MCP are not just for developers, they make web development accessible to everyone, even those without coding expertise.</p>
<p>Small business owners, digital creators, and freelancers can now create professional-grade landing pages with just a few prompts, allowing them to bring their visions to life without a steep learning curve.</p>
<h2 id="heading-what-is-bootstrap">What is Bootstrap?</h2>
<p>Bootstrap 5 is a powerful, open-source front-end framework that helps developers build responsive websites quickly. It provides a comprehensive set of components, a flexible grid system, and utility classes, making it easy to design modern, mobile-first websites with minimal effort.</p>
<p>Bootstrap is widely used for developing responsive, mobile-first websites. It offers a collection of reusable tools and components, such as navigation bars, forms, buttons, and more, which can be easily customized to meet specific project requirements.</p>
<h3 id="heading-why-choose-bootstrap-5-for-landing-pages">Why Choose Bootstrap 5 for Landing Pages?</h3>
<p>Bootstrap 5’s mobile-first approach, combined with its responsive grid system, makes it the go-to choice for building landing pages that perform seamlessly across all screen sizes.</p>
<p>The grid system, based on flexbox, enables designers to create fluid layouts that adapt to the user's viewport, ensuring that landing pages look polished on any device. With numerous utility classes for spacing, typography, and colors, developers can style pages quickly, reducing the need for custom CSS.</p>
<p>Additionally, Bootstrap 5 introduces modern CSS variables, enabling developers to easily adjust themes and style elements dynamically, perfect for projects that require quick visual updates.</p>
<p><strong>Key Bootstrap 5 Benefits for Landing Pages:</strong></p>
<ul>
<li><p><strong>Mobile-First Design</strong>: Built to prioritize mobile responsiveness, ensuring seamless performance across all devices, from phones to desktops.</p>
</li>
<li><p><strong>Extensive Component Library</strong>: A rich set of reusable, customizable components, such as buttons, alerts, forms, navigation bars, and more. This streamlines development and reduces the need for custom code.</p>
</li>
<li><p><strong>Responsive Grid System</strong>: The flexbox-based grid ensures that layouts are flexible, adaptive, and easy to modify for various screen sizes.</p>
</li>
<li><p><strong>Utility Classes</strong>: Bootstrap 5 includes a comprehensive set of utility classes for handling spacing, alignment, typography, and visibility, speeding up the styling process.</p>
</li>
<li><p><strong>Live Documentation &amp; Community Support</strong>: Bootstrap 5 offers detailed and interactive documentation, backed by a large, active community for support and resources.</p>
</li>
</ul>
<h2 id="heading-what-is-mcp"><strong>What is MCP?</strong></h2>
<p>MCP stands for Model Context Protocol. It is an open and standardized protocol designed to facilitate the interaction between large language models (LLMs) and external applications, data sources, and tools.</p>
<p>MCP enables seamless integration and contextualization, providing a uniform way for AI models to receive and understand context from various sources.</p>
<p>MCP works similarly to a universal connector, much like how USB-C serves as a common interface for connecting various devices.</p>
<p>Just as USB-C simplifies connectivity across devices, MCP streamlines the integration of LLMs with different data sources and services, ensuring smooth communication and enhancing the overall functionality of AI models.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758604936768/57e6f7b3-72c8-4c44-ae18-63bcb74c82d9.png" alt="MCP Structure" class="image--center mx-auto" width="1508" height="815" loading="lazy"></p>
<p>MCP empowers developers and organizations to build intelligent agents and complex workflows by offering the following:</p>
<ul>
<li><p><strong>Pre-built Integrations</strong>: A growing list of integrations that enable your LLM to plug into popular data sources, tools, and services without the need for custom development.</p>
</li>
<li><p><strong>Custom Integration Framework</strong>: A standardized way to create custom connections between LLMs and external services, ensuring flexibility and scalability across different use cases.</p>
</li>
<li><p><strong>Open Protocol</strong>: MCP is open-source, meaning anyone can implement and utilize it, promoting wider adoption and community-driven growth.</p>
</li>
<li><p><strong>Context Portability</strong>: MCP allows the transfer of context between various applications, making it easy to switch between services while maintaining the same level of contextual awareness across systems.</p>
</li>
</ul>
<p>By using MCP, you can build powerful AI-driven applications, automate complex workflows, and create more context-aware models that can interact seamlessly with the world around them.</p>
<h2 id="heading-basic-use-case-of-context7-in-mcp-for-bootstrap"><strong>Basic Use Case of Context7 in MCP for Bootstrap</strong></h2>
<p>When working with Bootstrap, one of the biggest challenges developers face is ensuring their code stays up-to-date with the latest version of the framework.</p>
<p>Bootstrap, like many modern front-end frameworks, undergoes frequent updates, and without access to version-specific documentation, LLMs (Large Language Models) may generate outdated or incorrect code, especially when dealing with new components or utility classes introduced in recent versions.</p>
<p>This can lead to frustrating issues, such as hallucinated code or incorrect implementation of new Bootstrap features. Manual efforts to update documentation or reference various sources are often time-consuming and inefficient, with the added challenge of keeping track of specific version differences across the framework’s evolution.</p>
<h3 id="heading-the-solution-context7-for-bootstrap">The Solution: Context7 for Bootstrap</h3>
<blockquote>
<p>Clean, version-specific Bootstrap documentation for accurate, up-to-date code generation.</p>
</blockquote>
<p>Context7 eliminates these issues by providing real-time, version-specific documentation directly to your AI tools, ensuring they always have the most accurate and relevant Bootstrap code. With Context7, you can be confident that the AI-generated code is fully aligned with the current version of Bootstrap, streamlining the development process and ensuring upto the mark implementation of the framework.</p>
<p><strong>Key Features of Context7 for Bootstrap:</strong></p>
<ul>
<li><p><strong>Version-Specific Bootstrap Documentation</strong>: Always up-to-date with the latest Bootstrap version, ensuring accurate integration of new classes, components, and utilities.</p>
</li>
<li><p><strong>Real, Working Bootstrap Code</strong>: Extracts working examples directly from official Bootstrap documentation, saving you time and effort.</p>
</li>
<li><p><strong>Concise and Relevant Information</strong>: Filters out unnecessary details and ensures you receive only the most useful snippets for your project.</p>
</li>
<li><p><strong>Free for Personal Use</strong>: Access the powerful Context7 tool without any cost for personal development and experimentation.</p>
</li>
<li><p><strong>MCP Integration</strong>: Seamlessly integrates with Model Context Protocol (MCP) to provide context-aware AI interactions, making it easier for developers to work with Bootstrap in real-time.</p>
</li>
</ul>
<h2 id="heading-how-to-use-context7-mcp-for-optimal-results-with-bootstrap-5">How to Use Context7 MCP for Optimal Results with Bootstrap 5</h2>
<p>When building responsive and modern landing pages, developers often face limitations with tools like Lovable and Bolt. These platforms typically provide pre-built templates, but they can restrict customization and integration, especially when working with powerful front-end frameworks like Bootstrap 5.</p>
<p>Unlike traditional solutions, Context7 MCP integrates with the most current official Bootstrap 5 documentation, providing real-time access to the latest framework updates, components, and best practices.</p>
<p>This feature is essential, as it ensures that the generated code adheres to Bootstrap 5’s latest standards, offering a far more flexible and accurate approach than static templates or LLM-based solutions, which might not reflect the most recent changes in Bootstrap 5.</p>
<p><strong>With Context7 MCP, you gain:</strong></p>
<ul>
<li><p><strong>Flexibility</strong>: Effortlessly generate custom Bootstrap 5 components tailored to your specific needs, such as navigation bars, buttons, or modals.</p>
</li>
<li><p><strong>Seamless Bootstrap 5 Integration</strong>: Fully integrate with Bootstrap 5’s responsive grid system and design conventions, ensuring your landing pages are both functional and adaptive to different screen sizes.</p>
</li>
<li><p><strong>Consistency</strong>: Maintain design consistency across your project without compromising on customization, leveraging the latest components and utilities directly from Bootstrap 5.</p>
</li>
<li><p><strong>Up-to-Date Components</strong>: Always have access to the latest Bootstrap 5 features and updates from MCP, ensuring that your landing pages are current with the latest changes in the framework.</p>
</li>
</ul>
<h3 id="heading-how-context7-mcp-enhances-productivity">How <strong>Context7 MCP</strong> Enhances Productivity</h3>
<p>By incorporating Context7 MCP into your development workflow, you streamline the process of building responsive landing pages and web applications.</p>
<p>Context7 MCP ensures that all your components align with latest Bootstrap 5 standards, making it easier to maintain consistency throughout your project.</p>
<p>This allows you to quickly adapt to the latest Bootstrap 5 updates, leveraging its latest features without the risk of introducing errors or inconsistencies.</p>
<h2 id="heading-step-by-step-build-ai-powered-landing-page-with-bootstrap-5-and-context7-mcp">Step-by-Step Build: AI-Powered Landing Page with Bootstrap 5 and Context7 MCP</h2>
<p>In this guide, we will walk through building an engaging <strong>AI-powered landing page</strong> using <strong>Context7 MCP</strong> and <strong>Bootstrap 5</strong>. We will cover everything from setting up the project environment to generating responsive Bootstrap components and integrating AI-powered elements to enhance user experience.</p>
<h3 id="heading-set-up-the-project-environment">Set Up the Project Environment</h3>
<p>Before we dive into creating the landing page, we’ll start by setting up the project structure and ensuring that we have Bootstrap 5 integrated. Additionally, we will leverage Context7 MCP to automate the generation of responsive components and layouts for the landing page.</p>
<h4 id="heading-1-set-up-the-project-folder">1. Set up the project folder:</h4>
<pre><code class="lang-bash">mkdir my-landing-page
<span class="hljs-built_in">cd</span> my-landing-page
</code></pre>
<p>Create the <code>index.html</code> file for the landing page layout:</p>
<pre><code class="lang-bash">touch index.html
</code></pre>
<p>Initialize the project with <code>npm</code>:</p>
<pre><code class="lang-bash">npm init -y
</code></pre>
<p>This will create a <code>package.json</code> file for the project.</p>
<h4 id="heading-2-add-bootstrap-5-to-the-project">2. Add Bootstrap 5 to the project:</h4>
<p>You can include Bootstrap 5 in two ways: by downloading the compiled CSS and JS files or by using a CDN. For simplicity, we’ll use the CDN links.</p>
<p>In the <code>&lt;head&gt;</code> section of your <code>index.html</code>, add:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"&lt;https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css&gt;"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span>&gt;</span>
</code></pre>
<p>At the end of the <code>&lt;body&gt;</code> section, add:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"&lt;https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js&gt;"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
</code></pre>
<p>This ensures that Bootstrap 5 is integrated into the project for layout and component styling.</p>
<h4 id="heading-3-basic-structure-of-the-landing-page">3. Basic Structure of the Landing Page:</h4>
<p>Start by setting up the basic layout in your <code>index.html</code> file:</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Landing Page<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Bootstrap 5 CDN --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"&lt;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css&gt;"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Landing Page Content --&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"&lt;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js&gt;"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>This simple structure sets the stage for a responsive design. Feel free to modify the content as per your requirements.</p>
<h2 id="heading-how-to-set-up-context7-mcp-in-vs-code">How to Set Up <strong>Context7</strong> MCP in VS Code</h2>
<p>Integrating Context7 MCP into your project is an essential step to streamline your development process, allowing seamless interaction with large language models (LLMs) and ensuring the generation of accurate, context-driven code. Below is a step-by-step guide on how to set up Context7 MCP in VS Code.</p>
<h3 id="heading-1-one-click-setup-optional"><strong>1. One-Click Setup (Optional)</strong></h3>
<p>For a quick and easy installation, you can use the one-click setup to install Context7 MCP in VS Code. Simply click the link below to initiate the installation:</p>
<p><a target="_blank" href="https://insiders.vscode.dev/redirect?url=vscode:mcp%2Finstall?%7B%22name%22:%22context7%22,%22command%22:%22npx%22,%22args%22:%5B%22-y%22,%22@upstash%2Fcontext7-mcp@latest%22%5D%7D&amp;utm_source=chatgpt.com">Install Context7 MCP in VS Code</a></p>
<p>This will automatically install Context7 MCP for you within VS Code, enabling it for use in your development environment.</p>
<h3 id="heading-2-add-mcp-configuration-to-vs-code"><strong>2. Add MCP Configuration to VS Code</strong></h3>
<p>Once Context7 MCP is installed, you’ll need to configure it within VS Code. This step ensures that VS Code communicates with the MCP server to fetch context-driven documentation and code examples.</p>
<p>To add the configuration, follow these steps:</p>
<ol>
<li><p>Open the <code>settings.json</code> file in VS Code by navigating to <code>File</code> &gt; <code>Preferences</code> &gt; <code>Settings</code> and clicking the {} Open Settings (JSON) icon.</p>
</li>
<li><p>Add the following MCP configuration to the settings file:</p>
</li>
</ol>
<pre><code class="lang-json"><span class="hljs-string">"mcp"</span>: {
  <span class="hljs-attr">"servers"</span>: {
    <span class="hljs-attr">"context7"</span>: {
      <span class="hljs-attr">"type"</span>: <span class="hljs-string">"http"</span>,
      <span class="hljs-attr">"url"</span>: <span class="hljs-string">"&lt;https://mcp.context7.com/mcp&gt;"</span>,
      <span class="hljs-attr">"headers"</span>: {
        <span class="hljs-attr">"CONTEXT7_API_KEY"</span>: <span class="hljs-string">"YOUR_API_KEY"</span>
      }
    }
  }
}
</code></pre>
<p>Replace <code>"YOUR_API_KEY"</code> with your actual API key from Context7. This key will authenticate your request and allow access to MCP services.</p>
<h3 id="heading-3-local-server-setup"><strong>3. Local Server Setup</strong></h3>
<p>If you prefer running Context7 MCP locally rather than using the hosted version, you can set up a local server. This is especially useful for working in isolated environments or without an internet connection.</p>
<p><strong>To configure Context7 MCP to run locally:</strong></p>
<ol>
<li><p>Open your <code>settings.json</code> file in VS Code.</p>
</li>
<li><p>Add the following configuration:</p>
</li>
</ol>
<pre><code class="lang-json"><span class="hljs-string">"mcp"</span>: {
  <span class="hljs-attr">"servers"</span>: {
    <span class="hljs-attr">"context7"</span>: {
      <span class="hljs-attr">"type"</span>: <span class="hljs-string">"stdio"</span>,
      <span class="hljs-attr">"command"</span>: <span class="hljs-string">"npx"</span>,
      <span class="hljs-attr">"args"</span>: [<span class="hljs-string">"-y"</span>, <span class="hljs-string">"@upstash/context7-mcp"</span>, <span class="hljs-string">"--api-key"</span>, <span class="hljs-string">"YOUR_API_KEY"</span>]
    }
  }
}
</code></pre>
<p>This setup runs Context7 MCP locally by invoking the <code>npx</code> command with the necessary arguments, including your API key.</p>
<h3 id="heading-4-installing-context7-in-other-editors"><strong>4. Installing Context7 in Other Editors</strong></h3>
<p>If you wish to set up Context7 MCP in other code editors, you can follow detailed installation guidelines available in the <a target="_blank" href="https://github.com/upstash/context7?tab=readme-ov-file&amp;utm_source=chatgpt.com#%EF%B8%8F-installation">Context7 Installation Documentation</a>. This resource provides step-by-step instructions for configuring MCP in various environments, ensuring compatibility with your preferred editor.</p>
<h2 id="heading-instructions-for-content-generation-and-confirmation-process">Instructions for Content Generation and Confirmation Process</h2>
<p>To begin generating content with Context7 MCP, you first need to confirm whether you'd like to proceed with the provided context. If you're using the context I've shared, simply click 'Continue' to confirm your choice.</p>
<p>A second confirmation will ensure that you want to generate content based on the prompt provided. Once you click 'Continue', the system will refer to the appropriate context (for example, Bootstrap documentation) and initiate the content generation process.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758609079268/c0767ab9-0950-4055-a875-315e95af8cfb.png" alt="content generation &amp; confirmation process.png" class="image--center mx-auto" width="401" height="409" loading="lazy"></p>
<p><strong>Note:</strong> When writing a prompt and intending to use Context7, make sure to include <code>using context7</code> at the beginning of the prompt. This explicitly directs the AI to generate content based on Model Context Protocol (MCP) and relevant context sources like Bootstrap 5 documentation.</p>
<h3 id="heading-how-to-automate-the-inclusion-of-context7-instructions"><strong>How to Automate the Inclusion of Context7 Instructions</strong></h3>
<p>If you'd like to avoid manually including the <code>using context7</code> instruction in every prompt, you can automate the process by setting default instructions in your project’s configuration files. To do this, add the following instructions to your <code>.github/copilot-instructions.md</code> file in the root directory of your project:</p>
<pre><code class="lang-html">always use context7 with bootstrap
</code></pre>
<h2 id="heading-methods-for-building-a-landing-page-with-ai">Methods for Building a Landing Page with AI</h2>
<h3 id="heading-1-building-a-complete-landing-page-with-a-single-prompt">1. Building a Complete Landing Page with a Single Prompt</h3>
<p>An effective landing page is not just about design, it must provide a seamless, user-friendly experience that immediately captures attention and guides visitors through the content.</p>
<p>By leveraging the flexibility of Bootstrap 5 and the power of the Context7 MCP framework, you can generate a complete, fully responsive landing page that performs well across all devices, both mobile and desktop.</p>
<p>Using a single prompt, you can quickly create a comprehensive layout with all essential sections, streamlining the process while maintaining visual appeal and functional design.</p>
<p><strong>Important Note:</strong> When generating a complete landing page layout, results may vary depending on different environments or agents. While creating a full-page design using a single prompt can yield some results, the precision and consistency may not be as high compared to generating individual sections. For more consistent and accurate results, consider using advanced models like Claude Sonnet 4 to ensure better output quality.</p>
<h4 id="heading-creating-a-responsive-ai-tool-landing-page">Creating a Responsive AI Tool Landing Page</h4>
<p>Here’s a template for building a responsive and dynamic landing page layout using Bootstrap 5, ensuring that all key sections are optimized for both mobile and desktop views:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758609225968/6687f86b-12a2-46c4-b56e-7a7669b49206.png" alt="AI landing page example" class="image--center mx-auto" width="1905" height="934" loading="lazy"></p>
<pre><code class="lang-html">Generate a responsive AI tool landing page layout with Bootstrap 5 featuring the following sections:
- Navigation Bar: Links to other sections of the page.
- Hero Section: A heading, subheading, and a compelling call-to-action button.
- About Section: Introduces the company or product.
- Features Section: Highlights key features and benefits.
- How It Works Section: Explains the process or flow.
- Pricing Section: Showcases pricing plans or offers.
- FAQ Section: Answers common questions and concerns.
- Contact Section: Provides contact details or an inquiry form.
- Footer Section: Includes copyright and additional links.
</code></pre>
<p>This structure ensures a logical flow, starting with an engaging Hero Section, followed by deeper insights into the product (Features, How It Works), and finishing with clear calls to action (Pricing, FAQ, and Contact).</p>
<p><strong>Code Example</strong></p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codepen.io/smitbhalodiya/embed/LEpMEON" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodePen embed" scrolling="no" allowtransparency="true" allowfullscreen="true" loading="lazy"></iframe></div>
<p> </p>
<p>You can access all the code for this landing page by cloning or downloading the repository:</p>
<p><a target="_blank" href="https://github.com/themeselection/bootstrap-landing-page"><strong>Repository Link</strong></a></p>
<p>For the complete code, including the full layout template, visit the <code>full-prompt-landing-page.html</code> file in the repository directly:</p>
<p><a target="_blank" href="https://github.com/themeselection/bootstrap-landing-page/blob/main/full-prompt-landing-page.html?"><strong>Full Code File</strong></a></p>
<h3 id="heading-2-creating-a-section-by-section-landing-page">2. Creating a Section-by-Section Landing Page</h3>
<p>Building a landing page section by section allows you to focus on each component individually, ensuring precise control over design and functionality.</p>
<p>By structuring your page into distinct sections (such as the hero, features, pricing, and so on), you can tailor the content and style of each part, ensuring that it aligns with your branding and conversion goals.</p>
<p>This method provides greater flexibility and customization, especially when using AI-powered tools like Context7 MCP, as it allows you to generate each section according to specific requirements and design preferences.</p>
<h4 id="heading-create-a-header-and-hero-section-with-ai-prompt">Create a Header and Hero Section with AI Prompt</h4>
<p>The Header and Hero Section are essential for setting the tone of your landing page. The hero section grabs visitors' attention immediately and introduces them to the key value proposition of your AI tool. The header ensures smooth navigation across the page.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a full-width hero section with a striking background image or color that highlights the AI tool. Include a compelling tagline that clearly communicates the main benefit of the tool, along with a call-to-action (CTA) button prompting users to 'Get Started' or 'Learn More.' Additionally, create a clean, responsive header section with a navigation bar containing links to: Home, About, Features, Pricing, FAQ, and Contact."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758610136433/ffcdc65b-3643-4db9-adbb-63558913a013.png" alt="header &amp; hero section example" class="image--center mx-auto" width="1905" height="935" loading="lazy"></p>
<div class="embed-wrapper">
        <iframe width="100%" height="350" src="https://codesandbox.io/embed/clxsvl?view=editor+%2B+preview" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="CodeSandbox embed" allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin" loading="lazy"></iframe></div>
<p> </p>
<p><strong>Customizing the Style:</strong></p>
<p>To further customize the style, you can adjust the background, font, and button classes either through the prompt or by manually editing the class names in the generated code. With MCP, you can also tweak colors and typography to better align with your brand's design guidelines.</p>
<h4 id="heading-create-an-engaging-about-section-with-ai-prompt">Create an Engaging About Section with AI Prompt</h4>
<p>The About section serves as an introduction to your AI tool, explaining its purpose, key features, and how it benefits users. It should establish trust and clearly communicate what makes your tool unique.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design an 'About' section with a brief overview of the AI tool. Include a short paragraph explaining the tool’s core features, its purpose, and how it stands out from competitors. Add an image or icon to visually complement the text."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758610832403/11aec6be-b98a-4612-b680-a52748a2b9d6.png" alt="about section example" class="image--center mx-auto" width="1499" height="747" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>You can adjust the background, typography, and button classes to fit your brand's aesthetic. Modify the content to better highlight the unique selling points of your AI tool, ensuring that it resonates with your target audience.</p>
<h4 id="heading-showcase-key-features-with-ai-prompt">Showcase Key Features with AI Prompt</h4>
<p>The Features section is essential for highlighting the core benefits and capabilities of your AI tool. It helps users understand exactly what the tool offers and how it can improve their workflow or solve their problems.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a Features section that lists the key features of the AI tool in a visually engaging manner. Include icons or images to represent each feature and provide short, clear descriptions of how each feature benefits the user. Ensure the section is easy to scan and encourages users to explore more."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758610934605/b3246eb3-15dd-4d89-b1bd-7ee465a863d4.png" alt="key features showcase example" class="image--center mx-auto" width="1012" height="764" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>You can easily adjust the icons, typography, and layout using the prompt or by editing the class names in the generated markup. Consider using your brand’s icons or color palette to make the section more visually aligned with your brand identity. You can also tweak the descriptions to focus on the features most important to your target audience.</p>
<h4 id="heading-present-pricing-plans-with-ai-prompt">Present Pricing Plans with AI Prompt</h4>
<p>The Pricing section is crucial for converting visitors into customers. It should clearly display the available pricing options, highlighting the value of each plan and encouraging users to take action. This section should be simple, yet persuasive, and easy to understand.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a Pricing section that clearly presents different pricing tiers. Include the plan names, prices, key features, and a clear call-to-action (CTA) button for each plan. Use a comparison table or card layout to make it easy for users to compare options and make an informed decision."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758611081962/078de2d2-238f-4164-a859-300ac284e6c3.png" alt="pricing example" class="image--center mx-auto" width="1241" height="853" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>To tailor the Pricing section to your brand, you can adjust the colors, fonts, and card styles. You can customize the pricing plans to fit your offering, modify the CTA buttons to highlight specific actions (for example, “Start Free Trial” or “Learn More”), and adjust the layout for different screen sizes.</p>
<h4 id="heading-create-an-informative-faq-section-with-ai-prompt">Create an Informative FAQ Section with AI Prompt</h4>
<p>The FAQ section is key to addressing common questions and concerns from potential users, helping them make informed decisions. It should be organized, easy to scan, and provide clear, concise answers. This section can also reduce customer support inquiries by offering quick solutions.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a FAQ section that addresses common questions about the AI tool. Use an accordion or collapsible design for better readability, and ensure the answers are concise and informative. Include a clear, inviting heading for the section and format the questions in a way that’s easy to scan."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758611141685/55f196ed-ce62-44ad-93c4-e71d06160084.png" alt="FAQ section example" class="image--center mx-auto" width="1250" height="847" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>You can personalize the FAQ section by adjusting the accordion style, colors, and fonts to match your brand’s theme. You can also modify the questions and answers based on the most common inquiries from your users. For a more dynamic effect, consider adding icons or images next to the questions.</p>
<h4 id="heading-create-an-engaging-contact-section-with-ai-prompt">Create an Engaging Contact Section with AI Prompt</h4>
<p>The Contact section is essential for encouraging visitors to reach out for more information, support, or inquiries. It should be clear, easy to use, and include all necessary contact details, as well as a form for quick communication.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a Contact section that includes a contact form with fields for name, email, subject, and message. Ensure the form is simple, easy to fill out, and includes a submit button. Also, provide clear contact details, such as a phone number, email address, and physical location (if applicable)."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758611619369/87e47a01-fddd-48af-9230-f597d40a932a.png" alt="contact section example" class="image--center mx-auto" width="1341" height="809" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>To align the Contact section with your brand’s design, you can modify the colors, fonts, and form styles. Adjust the form fields, buttons, and layout to match the look and feel of your website.</p>
<p>Additionally, you can add custom map integration or contact methods (like social media handles) to further enhance accessibility.</p>
<h4 id="heading-create-a-comprehensive-footer-section-with-ai-prompt">Create a Comprehensive Footer Section with AI Prompt</h4>
<p>The Footer section is often the last thing users see on a page, so it’s essential to include important links, contact details, and legal information. A well-designed footer can help improve site navigation and encourage further engagement with your content.</p>
<p><strong>Prompt Example:</strong></p>
<p>"Design a Footer section that includes key navigation links, such as Privacy Policy, Terms of Service, and social media icons (for example, Facebook, Twitter, LinkedIn). Include your company’s contact details (email, phone) and a copyright notice. The footer should be responsive and neatly organized."</p>
<p><strong>AI Output:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1758611686647/47902f6c-2472-4a1e-b2b9-a42c3ebc6414.png" alt="footer example" class="image--center mx-auto" width="1904" height="532" loading="lazy"></p>
<p><strong>Customizing the Style:</strong></p>
<p>To match your brand’s aesthetics, you can adjust the Footer section’s background color, typography, and icon styles. You can also add additional links like your blog, careers page, or a newsletter signup form. Ensure the footer is responsive by checking it on different screen sizes, making adjustments to spacing or layout as needed.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this tutorial, we’ve demonstrated how to create a modern, responsive landing page using Bootstrap 5 and integrate Context7 MCP. We also explored different methods for building the landing page, either using a single comprehensive prompt or constructing it section by section.</p>
<p>While a single comprehensive prompt can generate a landing page quickly, building it section by section typically yields better results. This approach allows for greater customization, finer control over each element, and ensures that every section aligns with your overall design vision.</p>
<p>By leveraging Bootstrap 5’s robust grid system and Context7’s AI-driven component generation, you can easily create landing pages that are not only visually appealing but also responsive and functional across all devices. This combination of tools makes the process faster, more efficient, and scalable.</p>
<p>You can also consider using a ready made <a target="_blank" href="https://themeselection.com/item/category/bootstrap-templates/">bootstrap template</a> which comes with pre designed landing pages.</p>
<p><strong>With this setup, you can expect:</strong></p>
<p>Rather than requiring developers to manually write repetitive code for common components, such as navigation bars, feature cards, or grids, VS Code and Context7 automates this process, allowing you to focus on higher-level design decisions.</p>
<p>It also ensures that the generated code is fully responsive and in alignment with latest Bootstrap 5’s framework, providing seamless integration with Bootstrap’s utilities like spacing, alignment, and visibility.</p>
<p>I hope you find this article helpful and worth reading. I have prepared this article with help of <a target="_blank" href="https://github.com/smitbhalodiya">Smit Bhalodiya</a>, a Front End developer with 5+ years of experience in the field.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn Bootstrap 5 in Spanish by Building a Portfolio Website – Bootstrap Course for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ Welcome! If you speak Spanish and you want to practice your HTML and CSS skills, create responsive websites with Bootstrap 5, and build your portfolio website, then this course is for you. In this article, you will find a brief introduction to respon... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-bootstrap-5-in-spanish-by-building-a-portfolio-website-bootstrap-course-for-beginners/</link>
                <guid isPermaLink="false">66b1f83e09c44225ad2c38f4</guid>
                
                    <category>
                        <![CDATA[ Bootstrap 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Español ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                    <category>
                        <![CDATA[ online courses ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Estefania Cassingena Navone ]]>
                </dc:creator>
                <pubDate>Thu, 10 Nov 2022 05:30:10 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/thumbnail-2.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Welcome! If you speak Spanish and you want to practice your HTML and CSS skills, create responsive websites with Bootstrap 5, and build your portfolio website, then this course is for you.</p>
<p>In this article, you will find a brief introduction to responsive web development and Bootstrap 5. You will also learn why you should learn them if your goal is to be a front-end web developer. </p>
<p>Then, you will find a 5-hour Bootstrap 5 course on the freeCodeCamp Spanish YouTube channel. In this course, you can learn the fundamentals in Spanish and build your portfolio website step by step using Bootstrap components, icons, and grid. </p>
<p>If you have Spanish-speaking friends, you are welcome to share the <strong><a target="_blank" href="https://www.freecodecamp.org/espanol/news/aprende-bootstrap-5-en-espanol-creando-tu-portafolio-personal-curso-de-bootstrap-desde-cero">Spanish version of this article</a></strong> with them.</p>
<p><strong>💡 Tip:</strong> to take the course, you should have previous knowledge of HTML and CSS. If you need to review these topics, I invite you to take our full courses on the <a target="_blank" href="https://www.youtube.com/freecodecampespanol">Spanish YouTube channel</a>.</p>
<p>Let's begin! ✨</p>
<h2 id="heading-what-is-bootstrap">🔹 What is Bootstrap?</h2>
<p>Let's start with an introduction to Bootstrap. The <a target="_blank" href="https://getbootstrap.com/">official Bootstrap documentation</a> defines it as a:</p>
<blockquote>
<p>Powerful, extensible, and feature-packed frontend toolkit.</p>
</blockquote>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Boostrap.png" alt="Image" width="600" height="400" loading="lazy">
<em>Bootstrap 5 - Official Website</em></p>
<p>Let's see the main keywords of this definition more closely:</p>
<ul>
<li>Bootstrap is <strong>powerful</strong> because it has many features, including pre-defined CSS classes that you can apply to your HTML elements to assign style instantly. With Bootstrap, you can also use powerful JavaScript plugins to create elements like carousels, modals, tooltips, and more. </li>
<li>Bootstrap is <strong>extensible</strong> because you can extend or customize the pre-defined CSS classes that come with Bootstrap to fit your needs. If you ever need to change a color, you can do so with custom CSS selectors, ids, and classes. You can also customize the JavaScript code that powers certain Bootstrap components. </li>
<li>Bootstrap is used for <strong>front-end</strong> web development because this area of web development focuses on designing and developing the user interface, the part of the website that users see and interact with directly. </li>
</ul>
<p><strong>💡 Tip:</strong> basically, Bootstrap gives you all the tools you need to develop responsive websites with pre-defined components, icons, and styles. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Snippets.png" alt="Image" width="600" height="400" loading="lazy">
<em>Examples of Bootstrap Components (<a target="_blank" href="https://getbootstrap.com/docs/5.2/examples/">source</a>)</em></p>
<h2 id="heading-importance-of-creating-a-developer-portfolio">🔶 Importance of Creating a Developer Portfolio</h2>
<p>Developing your portfolio website is very important to showcase your knowledge, skills, and the projects you have worked on during your learning journey.  </p>
<p>Think about it... </p>
<p>What is the best way to prove your knowledge and skills? </p>
<p>The answer is: <strong>creating real-world projects.</strong> </p>
<p>That is exactly what employers are looking for – developers who can learn new technologies and apply them to new scenarios. </p>
<p>Creating a project is a great way to show that you have the right skills and the motivation to work as a web developer. </p>
<p>Great. Now you know why it is important to create your developer portfolio, so let's see the portfolio website that you will create. 🔅</p>
<h2 id="heading-course-project">🔸 Course Project</h2>
<p>This is the main structure of the portfolio website project that we will build during the course:</p>
<h3 id="heading-hero-section-and-about-me-section">Hero Section and About Me Section</h3>
<p>This section will have a navigation bar and a profile image. The navigation bar will be responsive. A burger icon will be displayed in small devices (instead of the navbar) and the text will be hidden automatically. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/11/Screen-Shot-2022-11-06-at-9.21.20-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-experience-section"><strong>Experience section</strong></h3>
<p>This section will include three different areas of knowledge and badges to highlight specific skills. This section will be responsive and it will have a hover effect to add interactivity. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/11/Screen-Shot-2022-11-06-at-9.22.27-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-projects-section"><strong>Projects section</strong></h3>
<p>This section will include links to the GitHub repositories and to the live versions of the projects. We will create this section with the Bootstrap grid, so it will be fully responsive and you will learn to work with grid breakpoints. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.27.55-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-articles-section"><strong>Articles Section</strong></h3>
<p>A list of articles or blog posts. These will be Bootstrap cards and list groups. Each article will be represented by a link that will be opened on a new tab.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.28.12-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-testimonials-section"><strong>Testimonials Section</strong></h3>
<p>A clients testimonials carousel. This will be a Bootstrap carousel component with three testimonials and controllers to move to the previous or next item in the carousel.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/11/Screen-Shot-2022-11-06-at-9.23.28-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-contact-me-section-and-footer"><strong>Contact Me Section and Footer</strong></h3>
<p>This section will have links to social media profiles and it will show the copyright of the website. The social media links will be customized Bootstrap icons. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.28.47-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-behind-the-scenes"><strong>Behind the Scenes</strong></h3>
<p>We will work with:</p>
<ul>
<li>The Bootstrap grid to adapt the website to devices of different sizes. </li>
<li>Bootstrap components, including buttons, carousel, responsive navigation bar, responsive images, cards, list groups, and more.</li>
<li>Bootstrap icons to add links to social media profiles (Twitter, GitHub, LinkedIn, and Instagram).</li>
<li>Semantic HTML tags such as <code>&lt;header&gt;</code>, <code>&lt;section&gt;</code>, and <code>&lt;footer&gt;</code>.</li>
<li>Media queries to adapt the HTML elements to devices of different sizes and orientations. </li>
<li>CSS selectors</li>
<li>Google Fonts</li>
<li>More!</li>
</ul>
<p>You will practice many different skills by building this project and when you complete it, you will have a fully responsive professional portfolio to showcase your skills. </p>
<p>Sounds awesome, right?</p>
<p>💡 <strong>Tip:</strong> after creating the basic structure of the website, you can customize it with your unique profile image, skills, and projects. </p>
<h2 id="heading-development-tools">🔹 Development Tools</h2>
<p>We will work with multiple tools that developers use in their everyday work.</p>
<h3 id="heading-visual-studio-codehttpscodevisualstudiocom"><a target="_blank" href="https://code.visualstudio.com/">Visual Studio Code</a></h3>
<p>A powerful and popular code editor created by Microsoft. You can download and install it for free from its official website. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.47.40-PM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Visual Studio Code - Official Website</em></p>
<h3 id="heading-live-server-extension-for-visual-studio-codehttpsmarketplacevisualstudiocomitemsitemnameritwickdeyliveserver"><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer">Live Server Extension for Visual Studio Code</a></h3>
<p>A very helpful extension that will help us to improve our productivity by refreshing the browser when we change our HTML or CSS files. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.48.32-PM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Live Server - Documentation in the Extensions Marketplace</em></p>
<h3 id="heading-chrome-developer-toolshttpsdeveloperchromecomdocsdevtools"><a target="_blank" href="https://developer.chrome.com/docs/devtools/">Chrome Developer Tools</a></h3>
<p>A set of developer tools that come built-in with the Google Chrome browser. They are super helpful to test the responsiveness of the website, to select elements in the HTML structure, and to preview changes in the HTML and CSS files. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screen-Shot-2022-10-11-at-2.50.32-PM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Chrome Developer Tools - freeCodeCamp</em></p>
<p>💡 <strong>Tip:</strong> we will download and install all the necessary tools during the course and you will learn how to work with them step by step. </p>
<h2 id="heading-course-on-youtube">🔸 Course on YouTube</h2>
<p>Awesome. Now you know more about Bootstrap 5, about the importance of creating a professional portfolio. You also saw what you will learn during the course.</p>
<p>If you are ready, we invite you to start taking the course on the <a target="_blank" href="https://www.youtube.com/freecodecampespanol">freeCodeCamp Español</a> YouTube channel:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/QCw0L6FupQ0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>💻 In this link, you can access the <a target="_blank" href="https://estefaniacn.github.io/portafolio-adaptable-bootstrap/">live project</a> (in Spanish) and practice how to use Chrome Developer Tools. </p>
<p>✍️ Course created by <strong>Estefania Cassingena Navone</strong> (Twitter: <a target="_blank" href="https://twitter.com/EstefaniaCassN">@EstefaniaCassN</a>, YouTube: <a target="_blank" href="https://youtube.com/codingwithestefania">Coding with Estefania</a>).</p>
<p>I really hope you like the course and find it helpful to create your developer portfolio. </p>
<p>You are also welcome to continue learning with our <strong>Spanish</strong> courses:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/XqFR2lqBYPs" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/ivdTnPl1ND0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/DLikpfc64cA" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/6Jfk8ic3KVk" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/1hpc70_OoAg" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Create a Portfolio Website Using HTML, CSS, JavaScript, and Bootstrap 5 ]]>
                </title>
                <description>
                    <![CDATA[ By Sampurna Chapagain If you are a web developer or a web designer, it is essential for you to have a portfolio website. It lets you provide information about yourself and showcase your best work with your relevant skills and experience. In this blog... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-a-portfolio-website-using-html-css-javascript-and-bootstrap/</link>
                <guid isPermaLink="false">66d460f78812486a37369d58</guid>
                
                    <category>
                        <![CDATA[ Bootstrap 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ portfolio ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 25 Jan 2022 17:10:50 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/Untitled-design-6.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Sampurna Chapagain</p>
<p>If you are a web developer or a web designer, it is essential for you to have a portfolio website. It lets you provide information about yourself and showcase your best work with your relevant skills and experience.</p>
<p>In this blog post, I will discuss some of the benefits of creating a portfolio website. Then I'll show you how to create a beautiful responsive portfolio website for yourself using HTML, CSS, JavaScript and Bootstrap version 5.</p>
<h3 id="heading-heres-an-interactive-scrim-about-how-to-create-a-portfolio-website-using-html-css-js-and-bootstrap-5">Here's an interactive scrim about how to create a portfolio website using HTML, CSS, JS, and Bootstrap 5:</h3>
<div class="embed-wrapper"><iframe src="https://scrimba.com/scrim/co27f4302abab219aea652cf7?embed=freecodecamp,mini-header" width="100%" height="480" title="Embedded content" loading="lazy"></iframe></div>

<h2 id="heading-table-of-contents">Table Of Contents</h2>
<ul>
<li><a class="post-section-overview" href="#heading-benefits-of-having-a-portfolio-website">Benefits of having a portfolio website</a></li>
<li><a class="post-section-overview" href="#heading-what-is-bootstrap">What is Bootstrap</a>?</li>
<li><a class="post-section-overview" href="#heading-folder-structure">Folder Structure</a></li>
<li><a class="post-section-overview" href="#heading-how-to-add-a-navigation-menu-to-your-portfolio">How to Add a Navigation Menu to Your Portfolio</a></li>
<li><a class="post-section-overview" href="#heading-how-to-add-a-hero-header-to-the-portfolio">How to Add a Hero Header to the Portfolio</a></li>
<li><a class="post-section-overview" href="#heading-how-to-make-the-about-section">How to Make the About Section</a></li>
<li><a class="post-section-overview" href="#heading-how-to-make-the-services-section">How to Make the Services Section</a></li>
<li><a class="post-section-overview" href="#heading-how-to-add-dark-background-color-to-navbar-on-page-scroll">How to Add Dark Background Color to Navbar on Page Scroll</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-the-portfolio-section">How to Build the Portfolio Section</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-the-contact-section">How to Build the Contact Section</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-the-footer-section">How to Build the Footer Section</a></li>
<li><a class="post-section-overview" href="#heading-final-touches">Adding Final Touches</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-benefits-of-having-a-portfolio-website">Benefits of having a Portfolio Website</h2>
<p>Having a portfolio website has several benefits, including:</p>
<ul>
<li>it provides a platform to showcase your relevant skills and experience </li>
<li>it shows your personality</li>
<li>it lets hiring managers find you instead of you reaching out to them </li>
<li>you are easily searchable on search engines like Google </li>
</ul>
<h2 id="heading-what-is-bootstrap">What is Bootstrap?</h2>
<p>Bootstrap is a popular front-end CSS framework which is used to develop responsive and mobile friendly websites. The latest release of Bootstrap is version 5. You can find the official documentation of Bootstrap 5 <a target="_blank" href="https://getbootstrap.com/docs/5.0/getting-started/introduction/">here</a>. </p>
<h2 id="heading-folder-structure">Folder Structure</h2>
<p>We will now start working on creating the portfolio website.</p>
<p>First, let's create the folder structure. You can get the project starter files on <a target="_blank" href="https://github.com/SampurnaC/portfolio_website_fcc/tree/portfolio-starter-files">GitHub</a>. Also, you can visit <a target="_blank" href="https://brad-portfolio.netlify.app/">here</a> to see the live demo of this project.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/Screenshot-from-2022-01-22-19-10-25.png" alt="Image" width="600" height="400" loading="lazy">
<em>Project Folder Structure</em></p>
<p>The folder structure consists of index.html, style.css, and script.js files and an images folder. We'll write all CSS in the style.css file and the JavaScript in the script.js file . </p>
<p>In the index.html file, you can see the HTML boilerplate code with the Bootstrap CDN, <a target="_blank" href="https://fontawesome.com/">font awesome kit</a>, and a link to the external style sheet and JavaScript.</p>
<p>Here, the script.js file is loaded after loading all the HTML code. </p>
<h2 id="heading-how-to-add-a-navigation-menu-to-your-portfolio">How to Add a Navigation Menu to Your Portfolio</h2>
<p>Now, let's work on adding a navigation menu in our project. It will help visitors find the relevant info they're looking for.</p>
<p>We will use Bootstrap's <code>fixed-top</code> class in nav element to keep the navbar at the top of the page. The navbar also has a <code>navbar-brand</code> class where we keep the name of the person as a brand. </p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">nav</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar navbar-expand-lg fixed-top navbarScroll"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar-brand"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>&gt;</span>Brad<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar-toggler"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">data-bs-toggle</span>=<span class="hljs-string">"collapse"</span> <span class="hljs-attr">data-bs-target</span>=<span class="hljs-string">"#navbarSupportedContent"</span> <span class="hljs-attr">aria-controls</span>=<span class="hljs-string">"navbarSupportedContent"</span> <span class="hljs-attr">aria-expanded</span>=<span class="hljs-string">"false"</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Toggle navigation"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar-toggler-icon"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"collapse navbar-collapse"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"navbarSupportedContent"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar-nav ms-auto"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item active"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-link"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#home"</span>&gt;</span>Home<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-link"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#about"</span>&gt;</span>About<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-link"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#services"</span>&gt;</span>Services<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-link"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#portfolio"</span>&gt;</span>Portfolio<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-link"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#contact"</span>&gt;</span>Contact<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>

            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span>
</code></pre>
<p>The navbar has the following features:</p>
<ul>
<li>It has six links: home, about, services, portfolio, contact, and footer </li>
<li>It has a transparent background. We will add a dark background on page scrolling later.</li>
<li>It toggles on smaller devices</li>
</ul>
<p>You can find more details regarding Bootstrap 5 navbar features <a target="_blank" href="https://getbootstrap.com/docs/5.0/components/navbar/">here</a>.</p>
<p>However, the navbar has a problem while scrolling. It's fully transparent throughout the page which causes readability issues.  We will fix this issue after we complete the <a class="post-section-overview" href="#heading-how-to-make-the-services-section">Services section</a> to make you understand the issue properly. </p>
<h2 id="heading-how-to-add-a-hero-header-to-the-portfolio">How to Add a Hero Header to the Portfolio</h2>
<p>Now, we will be adding a hero image with some text in the center. A hero image is a web design term which refers to a high quality full width image that displays the company or individual's main goals, a representative image, photo, or other eye-catching elements. It helps attract users to your site.</p>
<pre><code class="lang-html"> <span class="hljs-comment">&lt;!-- main banner --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"bgimage"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"home"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container-fluid"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-12 col-md-12 col-sm-12 col-xs-12 hero-text"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"hero_title"</span>&gt;</span>Hi, it's me Brad<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"hero_desc"</span>&gt;</span>I am a professional freelancer in New York City<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p>  Also, let's add the CSS for the above code in the style.css file: </p>
<pre><code class="lang-css"><span class="hljs-comment">/* hero background image */</span>
<span class="hljs-selector-class">.bgimage</span> {
    <span class="hljs-attribute">height</span>:<span class="hljs-number">100vh</span>;
    <span class="hljs-attribute">background</span>: <span class="hljs-built_in">url</span>(<span class="hljs-string">'images/heroImage.jpeg'</span>);
    <span class="hljs-attribute">background-size</span>:cover;
    <span class="hljs-attribute">position</span>:relative;
}
<span class="hljs-comment">/* text css above hero image*/</span>
<span class="hljs-selector-class">.hero_title</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">4.5rem</span>;
}
<span class="hljs-selector-class">.hero_desc</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">2rem</span>;
}
<span class="hljs-selector-class">.hero-text</span> {
    <span class="hljs-attribute">text-align</span>: center;
    <span class="hljs-attribute">position</span>: absolute;
    <span class="hljs-attribute">top</span>: <span class="hljs-number">50%</span>;
    <span class="hljs-attribute">left</span>: <span class="hljs-number">50%</span>;
    <span class="hljs-attribute">transform</span>: <span class="hljs-built_in">translate</span>(-<span class="hljs-number">50%</span>, -<span class="hljs-number">50%</span>);
    <span class="hljs-attribute">color</span>: white;
}
</code></pre>
<p>Here we can see that the section has an id named <code>bgimage</code> which is responsible for displaying the background hero image with full width. It also displays some text in the center above the background image with the help of the above CSS. </p>
<p>This is how the site looks so far with the navbar and the hero section:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/Screenshot-from-2022-01-25-10-13-25.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hero Image with Navbar</em></p>
<h2 id="heading-how-to-make-the-about-section">How to Make the About Section</h2>
<p>The About page contains important information about you and your background. Visitors to your portfolio site can get to know you through the information you provide in this page. </p>
<p>We will be adding an image to the left side of the row, and on the right side we will add our quick introduction in this section. Let's demonstrate it using the code below:</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- about section--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"about"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container mt-4 pt-4"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>About Me<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row mt-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/about.jpeg"</span> <span class="hljs-attr">class</span>= <span class="hljs-string">"imageAboutPage"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">""</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-8"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged

                    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row mt-3"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-md-6"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Name: David Parker<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Age: 28<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Occupation: Web Developer<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>

                            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-md-6"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Name: David Parker<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Age: 28<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Occupation: Web Developer<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>

                            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row mt-3"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
                            Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
                        <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p> Let's add some CSS for the left side image:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* about section image css */</span>
<span class="hljs-selector-class">.imageAboutPage</span> {
    <span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>;
}
</code></pre>
<p>This will create an about section. You can modify the content based on your use cases. We have added classes named <code>mt-4</code> and <code>pt-4</code> with container class which will set the margin top and padding top to 1.5 rem.</p>
<p>The row has two columns. One has the <code>col-lg-4</code> class for displaying the image which will occupy the left column with a 4-part grid for large screens. </p>
<p>The next column is assigned a class of <code>col-lg-8</code> which will occupy the right column with an 8-part grid for larger screens. For medium and small screens they will overlap with each other which we can see in the below GIF file:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/about.gif" alt="Image" width="600" height="400" loading="lazy">
<em>About Section</em></p>
<h2 id="heading-how-to-make-the-services-section">How to Make the Services Section</h2>
<p>This section helps convert website visitors into potential clients. This is where you explain what specific services you offer, and where you <a target="_blank" href="https://www.freecodecamp.org/news/web-design-niche/">niche down</a> your offered services. </p>
<p>Let's add the code for this section and describe it below:</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- services section--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"services"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>Services<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fas servicesIcon fa-clock"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>Website Development<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'fas servicesIcon fa-layer-group'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>Website Design<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'far servicesIcon fa-check-circle'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>Website Deployment<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'fas servicesIcon fa-search'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>SEO<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'fas servicesIcon fa-shield-alt'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>DevOps<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card servicesText"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'fas servicesIcon fa-wrench'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title mt-3"</span>&gt;</span>QA<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text mt-3"</span>&gt;</span>Some quick example text to build on the card title and make up the bulk of the card's content.
                                Some quick example text to build on the card title and make up the bulk of the card's content.
                            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>  
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p>Since this website is targeted towards web developers and designers, I've included some of the services which a web developer or designer might offer.</p>
<p>We have used bootstrap cards to display services. Our services section has 2 rows and 3 columns each. For large screens with a width greater than or equal to 992px, three cards are displayed in a row. For screens less than 992px wide, only a single card is displayed in a row. </p>
<p>You can find more about bootstrap breakpoints <a target="_blank" href="https://getbootstrap.com/docs/5.0/layout/breakpoints/">here</a>. </p>
<p>Also, there are fonts added in each card to make them look better. </p>
<p>Without CSS, the services section would look like this :</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/Screenshot-from-2022-01-23-14-01-00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>So, let's add some CSS to increase the font icon font size and card height and add some extra color when a user hovers over a card.</p>
<pre><code class="lang-css"><span class="hljs-comment">/* services section css */</span>
<span class="hljs-selector-class">.servicesText</span><span class="hljs-selector-class">.card</span> {
    <span class="hljs-attribute">height</span>: <span class="hljs-number">280px</span>;
    <span class="hljs-attribute">cursor</span>: pointer;
  }
<span class="hljs-selector-class">.servicesIcon</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">36px</span>;
    <span class="hljs-attribute">text-align</span>: center;
    <span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>;
}
<span class="hljs-selector-class">.card-title</span> {
    <span class="hljs-attribute">text-align</span>: center;
}
<span class="hljs-selector-class">.card</span><span class="hljs-selector-pseudo">:hover</span> <span class="hljs-selector-class">.servicesIcon</span> {
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#008000</span>;
}
<span class="hljs-selector-class">.servicesText</span><span class="hljs-selector-pseudo">:hover</span> {
    <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid <span class="hljs-number">#008000</span>;
}
</code></pre>
<p>This is how our services section looks now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/services.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Services</em></p>
<h2 id="heading-how-to-add-dark-background-color-to-navbar-on-page-scroll">How to Add Dark Background Color to Navbar on Page Scroll</h2>
<p>If you look into the above gif properly you will see that the navbar is transparent throughout the page which causes readability issues. So let's work on fixing this issue.</p>
<p>We will write some JavaScript and CSS in order to resolve this problem. We will add a <code>navbarDark</code> class in order to show a dark background color for the navbar on page scroll. </p>
<p>For that we need to go to the script.js file and add the following code:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// add class navbarDark on navbar scroll</span>
<span class="hljs-keyword">const</span> header = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">'.navbar'</span>);

<span class="hljs-built_in">window</span>.onscroll = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">var</span> top = <span class="hljs-built_in">window</span>.scrollY;
    <span class="hljs-keyword">if</span>(top &gt;=<span class="hljs-number">100</span>) {
        header.classList.add(<span class="hljs-string">'navbarDark'</span>);
    }
    <span class="hljs-keyword">else</span> {
        header.classList.remove(<span class="hljs-string">'navbarDark'</span>);
    }
}
</code></pre>
<p> Now, let's break down the above code:</p>
<ul>
<li>The header holds the value of the nav element since the querySelector method returns the first element that matches the CSS selector (which is <code>.navbar</code> in this case).</li>
<li><code>window.onscroll</code> fires up when the scroll event happens.</li>
<li><code>window.scrollY</code> returns the number of pixels that the document is scrolled vertically and its value is assigned to a variable named <code>top</code>.</li>
<li>If the value of <code>top</code> is greater than or equal to 100, it adds a class of <code>navbarDark</code> to the header. </li>
</ul>
<p>Let's quickly add CSS for the <code>navbarDark</code> class. For that, go to your style.css file and add the following code:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* display background color black on navbar scroll */</span>
<span class="hljs-selector-class">.navbarScroll</span><span class="hljs-selector-class">.navbarDark</span> {
    <span class="hljs-attribute">background-color</span>: black;
}
</code></pre>
<p>This is how the navbar will look now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/navbar.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Dark background color on Navbar on page scroll</em></p>
<h2 id="heading-how-to-build-the-portfolio-section">How to Build the Portfolio Section</h2>
<p>This section includes your best work. People can see what you are capable of doing, and showcasing strong past work will definitely attract more potential clients or recruiters. So only add your best work in this section.</p>
<p>We will use Bootstrap cards to display the portfolio projects. There will be 2 rows and each row will have 3 columns of cards.</p>
<p>This will be the code for portfolio section: </p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- portfolio section--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"portfolio"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container mt-3"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>Portfolio<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage1.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>YouTube Clone<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card portfolioContent"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage4.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Quiz App<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card portfolioContent"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage3.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Product Landing Page<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card portfolioContent"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage4.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Messaging Service<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card portfolioContent"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage1.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Twitter Clone<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-4 mt-4"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card portfolioContent"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"images/portfolioImage4.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Card image"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width:100%"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">h4</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Blog App<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>
                                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success"</span>&gt;</span>Link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p>Each card has an image, title, description, and link to the projects. Three cards are displayed in a row for large screens which have breakpoints of ≥ 992px wide, but for screens &lt; 992px wide only a single card is displayed in a row.</p>
<p>The GIF below shows how the portfolio section looks now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/portfolio.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Portfolio</em></p>
<h2 id="heading-how-to-build-the-contact-section">How to Build the Contact Section</h2>
<p>You should include your contact information in this section so that visitors can contact you if they want to hire you. </p>
<p>Our contact section will include 2 columns in a single row: Google maps for location and a contact form. </p>
<p>In order to embed the Google map, you need to follow these steps:</p>
<ul>
<li>go to <a target="_blank" href="https://www.embed-map.com/">https://www.embed-map.com</a> </li>
<li>enter your location</li>
<li>click on the <strong>Generate HTML Code</strong> button which will provide your Google Map HTML Code</li>
</ul>
<p>Our code will look like this with the contact form included: </p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- contact section--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"contact"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container mt-3 contactContent"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-center"</span>&gt;</span>Contact Me<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>

            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row mt-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-6"</span>&gt;</span>
                    <span class="hljs-comment">&lt;!-- to edit google map goto https://www.embed-map.com type your location, generate html code and copy the html  --&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"max-width:100%;overflow:hidden;color:red;width:500px;height:500px;"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"embedmap-canvas"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"height:100%; width:100%;max-width:100%;"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"height:100%;width:100%;border:0;"</span> <span class="hljs-attr">frameborder</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://www.google.com/maps/embed/v1/place?q=new+york&amp;key=AIzaSyBFw0Qbyq9zTFTd-tUY6dZWTgaQzuU17R8"</span>&gt;</span>
                            <span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"googlemaps-html"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.embed-map.com"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"get-data-forembedmap"</span>&gt;</span>https://www.embed-map.com<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="css"><span class="hljs-selector-id">#embedmap-canvas</span> <span class="hljs-selector-tag">img</span>{<span class="hljs-attribute">max-width</span>:none<span class="hljs-meta">!important</span>;<span class="hljs-attribute">background</span>:none<span class="hljs-meta">!important</span>;<span class="hljs-attribute">font-size</span>: inherit;<span class="hljs-attribute">font-weight</span>:inherit;}
                        </span><span class="hljs-tag">&lt;/<span class="hljs-name">style</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-lg-6"</span>&gt;</span>
                    <span class="hljs-comment">&lt;!-- form fields --&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">form</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"form-control form-control-lg"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Name"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"email"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"form-control mt-3"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Email"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"form-control mt-3"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Subject"</span>&gt;</span>
                        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"mb-3 mt-3"</span>&gt;</span>
                            <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"form-control"</span> <span class="hljs-attr">rows</span>=<span class="hljs-string">"5"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"comment"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Project Details"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
                        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;/<span class="hljs-name">form</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-success mt-3"</span>&gt;</span>Contact Me<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>

                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p>The first column will display the Google map and the next one will display the contact form. </p>
<p>The form has four different form fields: name, email, subject and project details. The form doesn't submit the request itself. You will need to connect it with any back-end language. Or, you can simply use <a target="_blank" href="https://www.netlify.com/products/forms/">Netlify Form</a> or <a target="_blank" href="https://formspree.io/">Formspree form</a> for this.</p>
<p>This is how the contact section will appear:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/Screenshot-from-2022-01-25-11-31-56.png" alt="Image" width="600" height="400" loading="lazy">
<em>Contact Section</em></p>
<h2 id="heading-how-to-build-the-footer-section">How to Build the Footer Section</h2>
<p>Now we have come to the last section of this post, which is the footer section. We have already added a link to the font awesome CDN in the index.html file.  </p>
<p>In the Footer, we will add links to our social media through font awesome icons. </p>
<pre><code class="lang-html"> <span class="hljs-comment">&lt;!-- footer section--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">footer</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"footer"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container-fluid"</span>&gt;</span>
            <span class="hljs-comment">&lt;!-- social media icons --&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"social-icons mt-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.facebook.com/"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-facebook"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.instagram.com/"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-instagram"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.twitter.com/"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-twitter"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.linkedin.com/"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-linkedin"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.twitch.tv/"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-twitch"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
</code></pre>
<p>Without the CSS, our footer will look like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/Screenshot-from-2022-01-23-17-56-37.png" alt="Image" width="600" height="400" loading="lazy">
<em>footer without styling</em></p>
<p>So let's add some styling to the footer with this code:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* social media icons styling */</span>
<span class="hljs-selector-class">.social-icons</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">36px</span>;
    <span class="hljs-attribute">cursor</span>: pointer;
}
<span class="hljs-selector-class">.fa-facebook</span><span class="hljs-selector-pseudo">:hover</span>,<span class="hljs-selector-class">.fa-instagram</span><span class="hljs-selector-pseudo">:hover</span>,<span class="hljs-selector-class">.fa-twitter</span><span class="hljs-selector-pseudo">:hover</span>,<span class="hljs-selector-class">.fa-linkedin</span><span class="hljs-selector-pseudo">:hover</span>, <span class="hljs-selector-class">.fa-twitch</span><span class="hljs-selector-pseudo">:hover</span> {
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#008000</span>;
}
<span class="hljs-selector-class">.fab</span> {
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#000000</span>;
}
<span class="hljs-comment">/* footer styling */</span>
<span class="hljs-selector-id">#footer</span> {
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#808080</span>;
    <span class="hljs-attribute">text-align</span>: center;
}
</code></pre>
<p>The icons are now displayed in the center with a hover effect which we can see in the below GIF file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/footer.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Footer</em></p>
<h2 id="heading-final-touches">Final Touches</h2>
<p>In order to add some spacing between all the sections, let's add some more styling: </p>
<pre><code class="lang-css"><span class="hljs-comment">/* spacing on all sections */</span>
<span class="hljs-selector-id">#about</span>, <span class="hljs-selector-id">#services</span>, <span class="hljs-selector-id">#portfolio</span>, <span class="hljs-selector-id">#contact</span> {
    <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">4rem</span>;
    <span class="hljs-attribute">padding-top</span>: <span class="hljs-number">4rem</span>;
}
<span class="hljs-selector-id">#contact</span> {
    <span class="hljs-attribute">padding-bottom</span>: <span class="hljs-number">4rem</span>;
}
</code></pre>
<p>Now we're done making our complete portfolio website. </p>
<p>You can find the full source code of this project <a target="_blank" href="https://github.com/SampurnaC/portfolio_website_fcc/tree/master">here</a>. </p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>This is how you can create a complete responsive portfolio website using HTML, CSS, JavaScript, and Bootstrap 5 .</p>
<p>In this blog post we saw some of the benefits of creating a portfolio website for web developers and designers. We divided the whole website into different sections and discussed each one individually as we built it.</p>
<p> You can customize this website based on your own use cases.</p>
<p>I hope you found this post useful. </p>
<p>Happy Coding!</p>
<p>You can find me on <a target="_blank" href="https://twitter.com/saam_codes">Twitter</a> for daily content regarding Web development.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn Bootstrap 5 and SASS by Building a Portfolio Website ]]>
                </title>
                <description>
                    <![CDATA[ Bootstrap is one of the most popular CSS frameworks and Sass is one of the most popular preprocessors for CSS. We just published a course on the freeCodeCamp.org YouTube channel that will teach you about Bootstrap 5 and Sass by building a portfolio w... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-bootstrap-5-and-sass-by-building-a-portfolio-website/</link>
                <guid isPermaLink="false">66b20408f31aa965000e5854</guid>
                
                    <category>
                        <![CDATA[ Bootstrap 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Wed, 09 Jun 2021 18:43:07 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/06/portfolio.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Bootstrap is one of the most popular CSS frameworks and Sass is one of the most popular preprocessors for CSS.</p>
<p>We just published a course on the freeCodeCamp.org YouTube channel that will teach you about Bootstrap 5 and Sass by building a portfolio website.</p>
<p>Patrick Muriungi developed this course. He is an experienced developer and teacher.</p>
<p>Here are the different parts to this course:</p>
<ul>
<li>Part 1: Intro to Website Project       </li>
<li>Part 2: SASS Setup and Customizing Bootstrap               </li>
<li>Part 3: File structure</li>
<li>Part 4: The Navbar Section</li>
<li>Part 5: The Intro Section</li>
<li>Part 6: The Companies Section</li>
<li>Part 7: The Services Section</li>
<li>Part 8: Testimonials Section</li>
<li>Part 9: The FAQ Section</li>
<li>Part 10: The Portfolio Section</li>
<li>Part 11: Getting Started Section</li>
<li>Part 12: The Footer Section</li>
</ul>
<p>Here's what the portfolio website you'll= build will look like:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/06/image-88.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Watch the full course below or <a target="_blank" href="https://www.youtube.com/watch?v=iJKCj8uAHz8">on the freeCodeCamp.org YouTube channel</a> (5-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/iJKCj8uAHz8" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Switch from jQuery to Vanilla JavaScript with Bootstrap 5 ]]>
                </title>
                <description>
                    <![CDATA[ By Zoltán Szőgyényi Bootstrap 5 is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. In case you didn't know, Bootstrap 5 alpha has been officially launched. It has removed jQuery as a dependency, ha... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/bootstrap-5-vanilla-js-tutorial/</link>
                <guid isPermaLink="false">66d461c438f2dc3808b79128</guid>
                
                    <category>
                        <![CDATA[ Bootstrap ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Bootstrap 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ jQuery ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Tutorial ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 31 Jul 2020 18:09:09 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/07/bootstrap-5-vanilla-js.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Zoltán Szőgyényi</p>
<p><a target="_blank" href="http://v5.getbootstrap.com/">Bootstrap 5</a> is a free and open-source CSS framework directed at responsive, mobile-first front-end web development.</p>
<p>In case you didn't know, <a target="_blank" href="https://themesberg.com/blog/bootstrap/bootstrap-version-5-alpha-whats-new">Bootstrap 5 alpha has been officially launched</a>. It has removed jQuery as a dependency, has dropped support for Internet Explorer 9 and 10, and brings some awesome updates for the Sass files, markup, and a new Utility API.</p>
<p>This tutorial will show you how to start using VanillaJS instead of jQuery when building websites using the newest version of Bootstrap 5.</p>
<h2 id="heading-getting-started">Getting started</h2>
<p>You will need to include Bootstrap 5 in your project. There are several ways to do this, but to keep it simple we will include the framework via CDN.</p>
<p>First of all, let's create a blank <code>index.html</code> page inside a project folder:</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Bootstrap 5 Vanilla JS tutorial by Themesberg<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>Include the <code>bootstrap.min.css</code> stylesheet before the end of your <code>&lt;head&gt;</code> tag:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span>
</code></pre>
<p>Afterwards include the Popper.js library and the main Bootstrap JavaScript file before the end of your <code>&lt;body&gt;</code> tag:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
</code></pre>
<p>Curious what the <code>integrity</code> and <code>crossorigin</code> attributes mean? Here's the explanation:</p>
<p><strong>Integrity attribute</strong>: allows the browser to check the file source to ensure that the code is never loaded if the source has been manipulated.</p>
<p><strong>Crossorigin attribute</strong>: is present when a request is loaded using 'CORS' which is now a requirement of SRI checking when not loaded from the 'same-origin'.</p>
<p>Great! Now we have successfully included the newest version of Bootstrap in our project. One of the obvious differences is that we no longer had to require jQuery as a dependency, <strong>saving about 82.54 KB</strong> in bandwidth if in a minified state.</p>
<h2 id="heading-switching-from-jquery-to-vanilla-js">Switching from jQuery to Vanilla JS</h2>
<p>Before we get started with this section, you should know that using Bootstrap 5 with jQuery is still possible according to the <a target="_blank" href="https://v5.getbootstrap.com/docs/5.0/getting-started/javascript/#still-want-to-use-jquery-its-possible">official documentation</a>.</p>
<p>We recommend using Vanilla JavaScript if the only reason you've been using jQuery was for the query selector, because you can do the same thing with the <code>document.querySelector('#element')</code> as if it was <code>$('#element')</code>.</p>
<p>The first step is to create a JavaScript file and include it before the end of the body tag but after the other two includes:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"js/app.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
</code></pre>
<p>So when do you need to actually use Javascript with Bootstrap 5? There are certain components in the framework that work only if they are initialized via Javascript, such as tooltips, popovers and toasts.</p>
<p>Furthermore, with components such as modals, dropdowns, and carousels you may want to be able to programmatically change them based on a user action or application logic.</p>
<h3 id="heading-initializing-tooltips-via-vanilla-javascript">Initializing tooltips via Vanilla JavaScript</h3>
<p>We all love tooltips, but they don't work unless they are initialized via JavaScript. Let's first start by creating a tooltip element inside our <code>index.html</code> file:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"tooltip"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-secondary"</span> <span class="hljs-attr">data-toggle</span>=<span class="hljs-string">"tooltip"</span> <span class="hljs-attr">data-placement</span>=<span class="hljs-string">"top"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Tooltip on top"</span>&gt;</span>
    Tooltip on top
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>Hovering over the button will not show the tooltip, because by default it is an opt-in feature of Bootstrap and it needs to be initialized manually using JavaScript. If you want to do it with jQuery, here's how it would look:</p>
<pre><code class="lang-js">$(<span class="hljs-string">'#tooltip'</span>).tooltip();
</code></pre>
<p>Using Vanilla JS you would need to use the following code to enable the tooltip:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> tooltipElement = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'tooltip'</span>);
<span class="hljs-keyword">var</span> tooltip = <span class="hljs-keyword">new</span> bootstrap.Tooltip(tooltipElement);
</code></pre>
<p>What the code above does it that it selects the element with the unique id of "tooltip" and then creates a Bootstrap tooltip object. You can then use that to manipulate the state of the tooltip, such as showing or hiding the tooltip programmatically.</p>
<p>Here's an example on how you could show/hide it via methods:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> showTooltip = <span class="hljs-literal">true</span>;
<span class="hljs-keyword">if</span> (showTooltip) {
    tooltip.show();
} <span class="hljs-keyword">else</span> {
    tooltip.hide();
}
</code></pre>
<p>If you would like to enable all of the tooltips you could also use the following code:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> tooltipTriggerList = [].slice.call(<span class="hljs-built_in">document</span>.querySelectorAll(<span class="hljs-string">'[data-toggle="tooltip"]'</span>));
<span class="hljs-keyword">var</span> tooltipList = tooltipTriggerList.map(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">tooltipTriggerEl</span>) </span>{
  <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> bootstrap.Tooltip(tooltipTriggerEl)
});
</code></pre>
<p>What happens here is that we select all of the elements that have the <code>data-toggle="tooltip"</code> attribute and value and initialize a tooltip object for each one. It also saves them to a tooltipList variable.</p>
<h3 id="heading-toggle-the-visibility-of-your-elements-using-the-collapse-javascript-methods">Toggle the visibility of your elements using the Collapse JavaScript methods</h3>
<p>The collapse feature on Bootstrap is another very handy way to show and hide elements via data attributes or JavaScript.</p>
<p>Here's an example of how we can show or hide a card when a certain button is being clicked. Let's first create the HTML markup:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"toggleCardButton"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-primary mb-2"</span>&gt;</span>Toggle Card<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"card"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card collapse show"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 18rem;"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://dev-to-uploads.s3.amazonaws.com/i/rphqzfoh2cbz3zj8m8t1.png"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-img-top"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-body"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-title"</span>&gt;</span>Freecodecamp.org<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-text"</span>&gt;</span>Awesome resource to learn programming from.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-primary"</span>&gt;</span>Learn coding for free<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>So we created a button with the id <code>toggleCardButton</code> and a card with the id <code>card</code>. Let's start by selecting the two elements:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> toggleButton = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'toggleCardButton'</span>);
<span class="hljs-keyword">var</span> card = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'card'</span>);
</code></pre>
<p>Then we need to create a collapsable object using the newly selected card element:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> collapsableCard = <span class="hljs-keyword">new</span> bootstrap.Collapse(card, {<span class="hljs-attr">toggle</span>: <span class="hljs-literal">false</span>});
</code></pre>
<p>What the <code>toggle:false</code> flag does is that it keeps the element visible after creating the object. If not present, it would hide the card by default.</p>
<p>Now we need to add an event listener for the button for the click action:</p>
<pre><code class="lang-js">toggleButton.addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
    <span class="hljs-comment">// do something when the button is being clicked</span>
});
</code></pre>
<p>And lastly we need to toggle the card using the collapsable object that we initialized like this:</p>
<pre><code class="lang-js">toggleButton.addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
    collapsableCard.toggle();
});
</code></pre>
<p>That's it! Now the card will be shown/hidden whenever the button is clicked. Of course all of this could've been done using the <a target="_blank" href="https://v5.getbootstrap.com/docs/5.0/components/collapse/#via-data-attributes">data attributes feature</a> from Bootstrap, but you may want to toggle certain elements based on an API call or a logic in your application.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>If you have followed along this tutorial you should now be able to use the most popular CSS framework without the need of requiring jQuery in your project. This lets you <strong>save up to 85 KB of data</strong> and makes your website faster! Congratulations ?</p>
<p>If you appreciate this tutorial and like using Bootstrap as a CSS framework for your projects, I invite you to check out some of the free and premium <a target="_blank" href="https://themesberg.com/templates/bootstrap">Bootstrap themes, templates, and UI Kits</a> that we build at Themesberg ❤️</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
