Course Content
Bootstrap: Building Stylish Websites
1. Understanding Bootstrap
2. Setting Up Environment
4. Advanced Concepts
Bootstrap: Building Stylish Websites
Designing the Hero Section
Create the Hero Section
Below the navigation bar, create a hero section to introduce yourself. Use Bootstrap's grid system to organize the layout.
Code Description
-
Section with ID:
<section>
tag with the IDabout
defines a section of the webpage dedicated to providing information about the individual. -
Padding: Class
py-5
adds padding to the top and bottom of the section to create spacing. -
Container and Row:
<div>
with the classcontainer
and its child<div>
with the classrow
are used to create a responsive grid layout for content alignment. -
Professional Photo:
-
An
<img>
tag is used to display a professional photo of the individual. -
The
src
attribute specifies the path to the image file. -
The
alt
attribute provides alternative text for accessibility purposes. -
Class
img-fluid
ensures the image is responsive and adjusts its size according to the container. -
Inline styling (
style="display: block; margin: 0 auto"
) centers the image horizontally within its container.
-
An
-
Short Description:
-
<h1>
tag with classesh1
,text-center
,fs-2
, andtext-primary
displays the individual's name in a large, centered heading with primary text color. -
<p>
tag with classfs-3
provides a short description about the individual, including their profession, location, expertise, and interests.
-
2. Add Professional Photo and Description
Replace "your-photo.jpg"
with the file path or URL of your professional photo. Update the short description with information about yourself, including your profession, location, expertise, and interests.
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
Designing the Hero Section
Create the Hero Section
Below the navigation bar, create a hero section to introduce yourself. Use Bootstrap's grid system to organize the layout.
Code Description
-
Section with ID:
<section>
tag with the IDabout
defines a section of the webpage dedicated to providing information about the individual. -
Padding: Class
py-5
adds padding to the top and bottom of the section to create spacing. -
Container and Row:
<div>
with the classcontainer
and its child<div>
with the classrow
are used to create a responsive grid layout for content alignment. -
Professional Photo:
-
An
<img>
tag is used to display a professional photo of the individual. -
The
src
attribute specifies the path to the image file. -
The
alt
attribute provides alternative text for accessibility purposes. -
Class
img-fluid
ensures the image is responsive and adjusts its size according to the container. -
Inline styling (
style="display: block; margin: 0 auto"
) centers the image horizontally within its container.
-
An
-
Short Description:
-
<h1>
tag with classesh1
,text-center
,fs-2
, andtext-primary
displays the individual's name in a large, centered heading with primary text color. -
<p>
tag with classfs-3
provides a short description about the individual, including their profession, location, expertise, and interests.
-
2. Add Professional Photo and Description
Replace "your-photo.jpg"
with the file path or URL of your professional photo. Update the short description with information about yourself, including your profession, location, expertise, and interests.
Result
index.html
index.css
index.js
Everything was clear?