Question

Write the HTML tag and style attributes that creates a centered paragraph with double-spaced lines.

Write the HTML tag and style attributes that creates a centered paragraph with double-spaced lines.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For double spacing three attributes can use: line-height,position and top ;

Line height attribute

The position property specifies the type of positioning method used for an element.(static, relative, absolute, fixed, or sticky).

the "top" is a top vertical alignment .1em is a default font size.

Example code:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
p.double-space {
line-height: 2;
position: relative;
top: -.5em;
text-align:center;
}
</style>
</head>
<body>
<p class="double-space">Paragraph of double-spaced text. With different sentences for showing the double spaced text.</p>
<p class="double-space">This is a Paragraph.</p>

</body>
</html>

I added the screenshot of output .

Add a comment
Know the answer?
Add Answer to:
Write the HTML tag and style attributes that creates a centered paragraph with double-spaced lines.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT