Course Content
Bootstrap: Building Stylish Websites
1. Understanding Bootstrap
2. Setting Up Environment
4. Advanced Concepts
Bootstrap: Building Stylish Websites
Implementing the Contact Form
1. Add the Contact Form Section
Create a section at the bottom of the page to accommodate the contact form.
Code Description
-
Section with ID:
<section>
tag with the IDcontact
defines a section of the webpage dedicated to providing contact information and a contact form. -
Contact Section Styling:
-
Class
py-5
adds padding to the top and bottom of the section to create spacing. -
Class
bg-secondary
sets the background color of the section to a secondary color.
-
Class
-
Container and Row:
<div>
with the classcontainer
and its child<div>
with the classrow
are used to create a responsive grid layout for skills. -
Form Column:
-
<div>
with classcol-md-8 mx-auto
creates a column for the contact form. -
<h2>
tag with classestext-center
,mb-4
, andtext-light
displays the section title "Contact Me" in a centered manner with light text color and adds margin to the bottom of the heading.
-
-
Contact Form:
-
<form>
tag is used to create a contact form. -
<label>
tags with classform-label
provide labels for input fields. -
<input>
tags with classform-control
create input fields for name and email. -
<textarea>
tag with classform-control
creates a text area for the message. -
<button>
tag with classesbtn
andbtn-warning
creates a submit button with a warning color.
-
2. Create the Contact Form
Within the form, use Bootstrap's form components to create input fields for name, email, message, etc. Customize the form labels, placeholders, and button text as needed.
Result
index.html
index.css
index.js
Everything was clear?
Course Content
Bootstrap: Building Stylish Websites
1. Understanding Bootstrap
2. Setting Up Environment
4. Advanced Concepts
Bootstrap: Building Stylish Websites
Implementing the Contact Form
1. Add the Contact Form Section
Create a section at the bottom of the page to accommodate the contact form.
Code Description
-
Section with ID:
<section>
tag with the IDcontact
defines a section of the webpage dedicated to providing contact information and a contact form. -
Contact Section Styling:
-
Class
py-5
adds padding to the top and bottom of the section to create spacing. -
Class
bg-secondary
sets the background color of the section to a secondary color.
-
Class
-
Container and Row:
<div>
with the classcontainer
and its child<div>
with the classrow
are used to create a responsive grid layout for skills. -
Form Column:
-
<div>
with classcol-md-8 mx-auto
creates a column for the contact form. -
<h2>
tag with classestext-center
,mb-4
, andtext-light
displays the section title "Contact Me" in a centered manner with light text color and adds margin to the bottom of the heading.
-
-
Contact Form:
-
<form>
tag is used to create a contact form. -
<label>
tags with classform-label
provide labels for input fields. -
<input>
tags with classform-control
create input fields for name and email. -
<textarea>
tag with classform-control
creates a text area for the message. -
<button>
tag with classesbtn
andbtn-warning
creates a submit button with a warning color.
-
2. Create the Contact Form
Within the form, use Bootstrap's form components to create input fields for name, email, message, etc. Customize the form labels, placeholders, and button text as needed.
Result
index.html
index.css
index.js
Everything was clear?