×

Design a tribute page using HTML and CSS

A tribute page is a webpage based on a person who inspired us in our life. In this article, we will create a webpage of Mahatma Gandhi. We are going to use HTML and CSS to create this webpage. On this webpage, we first give a title, and attach a photo below that title. Below that photo, we also write some achievements of Mahatma Gandhi. We are using some HTML tags for designing this webpage.

  • <body> - We use this tag to give the title to the page.
  • <h1 – This tag is used for the heading of the webpage.
  • Img – This tag is used for the image.
  • <p> - This tag is used for writing the content.

HTML code

<html>
<head>
<meta charset="utf-8">
<title>Mahatma Gandhi - Tribute page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main id="main">
<header>
<h1 id="title">Mahatma Gandhi</h1>
</header>
<p class="subtitle">A peaceful leader</p>
<figure id="img-div">
<a href="http://philogalichet.fr/wp-content/uploads/2019/01/Gandhi_Photo-Alamy.jpg" target="_blank">
<img class="lift-animation" id="image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Mahatma-Gandhi%2C_studio%2C_1931.jpg/480px-Mahatma-Gandhi%2C_studio%2C_1931.jpg"
alt="A black-and-white photograph of Mahatma Gandhi wearing a stole."/></a>
<figcaption id="img-caption">Photograph of Mahatma Gandhi, London, 1931</figcaption>
</figure>
<section id="tribute-info">
<h2>A brief summary of Gandhi's journey</h2>
<h3>Early life</h3>
<p>
Mahatma Gandhi was born on October 2, 1869, in Porbandar, India, which was then part of the British Empire.
Although young Gandhi wanted to become a doctor, his father, who served as a chief minister in Porbandar, persuaded him to study law.
After 3 years of studies in London (where he became a vegetarian), Gandhi came back to India and tried to start his career as a lawyer.
</p>
<h3>South Africa</h3>
<p>
After struggling to find a job in India, he went to South Africa for a one-year contract to perform legal services. 
Gandhi was there confronted with discrimination against Indian immigrants by British authorities. 
At the end of his contract, Gandhi fought against a bill that would ban Indians from voting. 
Although he didn't stop the bill from passing, it initiated his fight for equality of human rights.
</p>
<h3>Return to India</h3>
<p>
In 1914, Gandhi sailed from South Africa to India, where he founded an ashram that was open to all castes.


</p>


</p>
<h3>India’s Independence</h3>
<p>
After a series of protests, India's independence was inevitable.
The Government of India Act (1935) surrendered significant amounts of power to Indians, and the Indian National Congress clamoured for more.
But after World War II Muslim League demanded that a separate state be created for India's Muslims, and to Gandhi's great distress, the Congress leaders agreed.
In August 1947, India was finally independent, not as a whole but divided into two countries, India and Pakistan. 
</p>
<h3>Assasination</h3>
<p>
Gandhi was assassinated by a Hindu nationalist, Nathuram Godse, in Delhi on January 30, 1948.
Godse stated that he killed Gandhi because of his complacency towards Muslims, holding him responsible for the frenzy of violence and suffering.
Gandhi's death was mourned nationwide, and over a million people joined the five-mile-long funeral procession that took over five hours. 
</p>
<h3>Legacy</h3>
<p>
Gandhi's commitment to nonviolence and his belief in simple living — making his clothes, eating a vegetarian diet — has been a beacon of hope for oppressed people around the world for decades to come after his death.
Gandhi's actions inspired future human rights movements around the globe, including those of civil rights leader Martin Luther King Jr. in the United States and Nelson Mandela in South Africa. 
</p>
</section>


<a href="https://wisdomquotes.com/gandhi-quotes/" target="_blank">
<blockquote class="lift-animation" cite="https://tanvi-gadhiya7.medium.com/in-a-gentle-way-you-can-shake-the-world-mahatma-gandhi-he-4de151cbba58">
<p>"In a gentle way, you can shake the world."</p>
<cite>- Mahatma Gandhi</cite></a>
</blockquote>
</main>
</body>
</html>

CSS code 

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP&family=Noto+Serif&family=Playfair+Display:ital@1&family=Roboto+Mono&family=Special+Elite&family=Zilla+Slab&display=swap');
html {
font-family: Noto Serif, serif;
font-size: 10px;
font-weight: 150;
color: black;
background: url(https://images.rawpixel.com/image_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIyLTA1L3B4NjUwODQ3LWltYWdlLWpvYjYzMC1hXzIuanBn.jpg);
}
body {
font-size: 1.6rem;
margin: 0 auto;
width: 70vw;
text-align: center;
}
@media (max-width: 768px) {
body {
width: 100vw;
}
}
@media (min-width: 1200px) {
body {
max-width: 700px;
}
}
a {
color: black;
text-decoration: none;
}
h1 {
font-family: Noto Sans JP, sans-serif;
font-size: 4rem;
color: black;
}
.subtitle {
font-family: Noto Sans JP, sans-serif;
font-size: 2rem;
color: black; 
}
h2 {
font-family: Noto Sans JP, sans-serif;
font-size: 2.8rem;
margin: 50px 0 25px 0;
text-align: center;
}
h3 {
font-family: Noto Sans JP, sans-serif;
font-size: 2rem;
font-weight: 600;
margin: 40px 0 5px 0;
color: black;
}
section {
text-align: left;
}
#image {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
border-radius: 25px;
}
#img-caption {
font-family: Noto Sans JP, sans-serif;
margin-top: 20px;
}


blockquote {
font-family: Special Elite, sans-serif;
font-size: 2.25rem;
background-color: ghostwhite;
margin: 30px 3% 0 3%;
padding: 10px 0% 20px 0%;
max-width: 100%;
height: auto;
border-radius: 25px;
background: url(https://i.pinimg.com/originals/10/f9/44/10f944389ace361ae00a3fc6b7b16e9e.jpg)
}
cite {
font-family: Noto Sans JP, sans-serif;
font-size: 1.6rem;
}


.source-image {
width: 200px;
height: 100px;
border-radius: 15px;
background-color: white;
margin: 0 10px 50px 10px;
}
.lift-animation {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.322);
-webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
margin-bottom: 30px;
}
.lift-animation::after {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 15px 15px rgba(0, 0, 0, 0.322); opacity: 0;
-webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.lift-animation:hover {
box-shadow: 15px 15px 15px rgba(0, 0, 0, 0.377);
-webkit-transform: scale(1.03, 1.03);
transform: scale(1.03, 1.03);
}
.lift-animation:hover::after {
opacity: 1;
}

Supported Browsers

  • Google Chrome
  • Microsoft Edge
  • Firefox
  • Opera
  • Safari

Output

Design a tribute page using HTML and CSS
Design a tribute page using HTML and CSS
Design a tribute page using HTML and CSS

Related Topics

HTML &lt;body> alink Attribute

HTML <body> alink Attribute What is HTML? The HTML or HyperText Markup Language is used to design web pages. The file extension name for HTML file is ".html". It was released in...

2 minutes read.

HTML5 Tags

HTML5 Tags A list of newly included tags is provided in HTML5. These HTML 5 tags (elements) provide a better structure for the document. This list shows description of all HTML...

3 minutes read.

HTML Canvas

HTML Canvas: Using JavaScript, the < canvas > tag in HTML is used for drawing graphics on web page. It can be used to draw routes, boxes, text, gradient, and...

3 minutes read.

HTML Audio

HTML AUDIO: HTML5 provides a method to embed the audio file into a webpage by using HTML5. Before HTML5 audio files is used to play on the browser with the help of...

1 minute read.

HTML5 Attribute

HTML Attribute HTML attributes are special words that provide additional information about the HTML element or attributes.The element or tags have attributes, which define the element's behavior.It also adds attributes with a start...

3 minutes read.

Html &lt;datalist >Tag

The autocomplete feature in HTML files is provided by the <datalist> tag. It can be used in conjunction with an input tag to enable users to quickly fill out form...

4 minutes read.

HTML 5 Tutorial

What is HTML5? HTML5 is a programming language which stands for the acronym Hyper Text Markup Language 5. It is program that enables the appearance of web pages to be changed, as well as changes...

5 minutes read.

Div Tag in HTML

In HTML, ‘div’ is a tag that specifies division or section in HTML document. But before going in detail of it, let’s first understand about tags in HTML. The tag...

8 minutes read.

HTML Forms

Forms are required when we want to collect data from the user. Html forms consists of different fields to take user inputs such as: input, text area, checkbox, password, radio...

4 minutes read.

How to change font in HTML

To give style to the content of your website, you may change the font of the text and make your website look attractive to the user. There are several methods which...

4 minutes read.

HTML <sup> Tag

The HTML sup element is used to describe one or more superscript contents. The sup tag shows a text which is presented above the regular line and half the length...

2 minutes read.

Html <colgroup> Tag

A HTML table's column group is specified by the "colgroup" tag. If you want to apply various properties to one or more <col> elements in an HTML table, then you...

4 minutes read.

HTML <style> tag

The section of information that we want to style is contained in html style tag. It includes CSS, which is used to design the text and images in the web page. Syntax: <head> <title>…………....

3 minutes read.

How to create a link with no underline in HTML

In HTML, an anchor tag (<a>) is a Styled Container tag, which means when a hyperlink is created using this, browsers, by default, display the link by applying some styles...

5 minutes read.

HTML Hide Element

The HTML hide element is used to hide the element. We place the hidden attribute inside those elements which we want to hide. The hidden attribute is a Boolean attribute. The...

3 minutes read.

HTML Frames

Frames in Html is used to divide the browser into different sections where each section can load different Html documents. Collection of frame is known as Frameset. Creating frames:We use frameset...

2 minutes read.

HTML Button Disabled

The HTML <button> element has many attributes, one of them is the disabled attribute. The button on which you apply the disabled attribute will not work, or we can say...

4 minutes read.

HTML Id Attribute

The HTML id attribute represents the unique identifier for an element of the HTML document. Each element has its unique identifier. The id attribute is a global attribute that can be...

12 minutes read.

HTML <section> tag

The section element in HTML is used to define sections in a document. Syntax of Section Tag: <body> <h1>……….</h1> <section> <h2>……….</h2> <p> …………………………</p> </section> <section> <h2>………..</h2> <p>…………………………. <p> </section> </body> Examples of Section Tag Example 1: In this example, we use the HTML "section" element...

3 minutes read.

HTML Lists

HTML List HTML lists are used to specify data sets. All lists can include one or more elements from the list. HTML lists are available in three different types: Ordered List or...

4 minutes read.