My Blogsession 2
My Blogsession 2
MY BLOG
MY BLOG
The goal of this project is to create an art-themed blog using HTML, CSS, and
Bootstrap.
This project emphasises designing an art-themed blog using CSS and HTML. It
incorporates the concepts of bootstrap and an interactive web layout.
Today’s Objectives
Learning Outcomes
1
MY BLOG
Introduction
The first step while designing a blog is to identify different sections and organise
them. Each section should serve a specific purpose:
1. A Header Section with navigation links — commonly referred to as a
Navigation Bar or Navbar.
2. A Carousel Section to display images related to the blog.
3. A Blog Section displaying articles.
4. An About Me Section to display the blogger’s information.
5. A Popular Post Section to display popular article titles.
6. A Footer Section containing contact information.
2
MY BLOG
1. News blogs
A news blog contains the latest news from the area it covers — a city,
country, continent, or the world. It requires constant updates with large
amounts of content.
3
MY BLOG
2. Personal blogs
A personal blog talks about the writer’s opinions. It often connects with people
who share the same opinion.
4
MY BLOG
3. Business blogs
5
MY BLOG
6
MY BLOG
Technical Activity
In today’s session, we will complete our blog page using CSS and bootstrap.
7
MY BLOG
Step 2: This CSS file needs to be linked to the HTML page using the link tag. We
add the CSS file name as a value in the href attribute.
Note:
rel = “stylesheet” specifies that we are importing a CSS file.
Let us start to design the webpage using CSS. We will code all CSS properties in
the style.css file.
8
MY BLOG
9
MY BLOG
Note:
When we specify two values on a padding property, the first value represents
padding-top and padding-bottom. The second value represents padding-left and
padding-right.
10
MY BLOG
Flexbox
Flexbox is a CSS feature that offers an efficient way to layout and align items
within a container. It provides a responsive layout — which means that the layout
automatically adjusts when the container is resized on different devices like
mobile phones.
Horizontal Alignment
Vertical Alignment
11
MY BLOG
Step 2: Change the colour of the heading “ART BLOG” to a colour of your choice.
12
MY BLOG
13
MY BLOG
Step 2: To remove the circle bullets from the list items, use list-style-type: none.
To remove the underline, use text-decoration: none.
14
MY BLOG
Step 2: Scroll down to the CSS section and copy the link.
Step 3: Open the index.html file and paste the copied link within the head tag.
15
MY BLOG
Step 4: To add the carousel, go to the Bootstrap website and click on Docs.
Step 5: In the next window, search for Carousel in the search box. Select the first
search result.
16
MY BLOG
Step 6: Once the carousel section is displayed, scroll down to the Slides Only
section and copy the code provided.
17
MY BLOG
Step 7: Open the index.html file. Within the carousel container, paste the code.
Remove the heading text from the previous session.
18
MY BLOG
Step 1: Inside the carousel code, find the <img> tag with the empty src attribute.
This is where we add the image name and its location.
19
MY BLOG
Step 2: In style.css, refer to the <img> tag inside the carousel container. Give it a
fixed height using the max-height property.
Step 1: Inside the Carousel container — just below the <img> tag — create a
container and give it a class carousel-caption.
20
MY BLOG
Step 2: Inside this container, add an <h2> tag and a <p> tag with text in them. The
text should describe the image.
Step 3: Increase the font size to make the text appear clearer. Since the <h2> and
<p> tags are placed inside the carousel-caption class container, we use that class
to refer to the heading and paragraphs.
21
MY BLOG
Step 4: Repeat the process and add text for the remaining images in the Carousel
Output
22
MY BLOG
Review
Closure
Try changing the background image and the text colour of the carousel.
23