THEOP05
THEOP05

Reputation: 19

How to setup the text?

I am making a lyrics website where the lyrics are printed line by line but I want the text to be like this:-

enter image description here

but it comes out like this:-

enter image description here

So how do I set it up like that???

Here is my code for the lyrics:-

<html>

<head>
<title>Lyrics of We will we will rock you by Queen</title>
</head>
<body>
<h2 style="font-family: Arial">
Lyics of We will we will rock you by Queen (Link to the official video at the bottom of the page)
</h2>

<p style="font-family: Arial">
The Lyics Are:-
</p>

<p style="font-family: Arial">

Buddy, you're a boy, make a big noise
Playing in the street, gonna be a big man someday
You got mud on your face, you big disgrace
Kicking your can all over the place, singin'
We will, we will rock you
We will, we will rock you
Buddy, you're a young man, hard man
Shouting in the street, gonna take on the world someday
You got blood on your face, you big disgrace
Waving your banner all over the place
We will, we will rock you, sing it!
We will, we will rock you, yeah
Buddy, you're an old man, poor man
Pleading with your eyes, gonna get you some peace someday
You got mud on your face, big disgrace
Somebody better put you back into your place, do it!
We will, we will rock you, yeah, yeah, come on
We will, we will rock you, alright, louder!
We will, we will rock you, one more time
We will, we will rock you
Yeah

</p>

<a style="font-family: Arial" href="https://www.youtube.com/watch?v=-tJYN-eG1zk">The offical video of the song</a>
<p style="font-family: Arial" >Copyright &copy; 2022 Manik Sharma (THEOP05)</p>
</body>

</html>

Upvotes: 0

Views: 69

Answers (1)

Archit Gargi
Archit Gargi

Reputation: 685

HTML automatically removes all white spaces. That’s why it’s not working. To make it work you need to use <pre> tag. This tag keeps the original formatting the author did within it.

<html>

<head>
<title>Lyrics of We will we will rock you by Queen</title>
</head>
<body>
<h2 style="font-family: Arial">
Lyics of We will we will rock you by Queen (Link to the official video at the bottom of the page)
</h2>

<p style="font-family: Arial">
The Lyics Are:-
</p>





<pre style="font-family: Arial">






Buddy, you're a boy, make a big noise
Playing in the street, gonna be a big man someday
You got mud on your face, you big disgrace
Kicking your can all over the place, singin'
We will, we will rock you
We will, we will rock you
Buddy, you're a young man, hard man
Shouting in the street, gonna take on the world someday
You got blood on your face, you big disgrace
Waving your banner all over the place
We will, we will rock you, sing it!
We will, we will rock you, yeah
Buddy, you're an old man, poor man
Pleading with your eyes, gonna get you some peace someday
You got mud on your face, big disgrace
Somebody better put you back into your place, do it!
We will, we will rock you, yeah, yeah, come on
We will, we will rock you, alright, louder!
We will, we will rock you, one more time
We will, we will rock you
Yeah

</pre>

<a style="font-family: Arial" href="https://www.youtube.com/watch?v=-tJYN-eG1zk">The offical video of the song</a>
<p style="font-family: Arial" >Copyright &copy; 2022 Manik Sharma (THEOP05)</p>
</body>

</html>

Upvotes: 2

Related Questions