Assessment wanted for Marking up a letter - H J

Hello :wave:
I’m the beginner learning front-end basic. I would like my work assessed. Thanks!!!

My CodePen code.

I also have a question. How to adjust the paragraph position to left side correctly?
I want to align and position.

Thank you so much !!! :smiley:

Hi @hungjack and welcome to the community :wave:

Very well done! :medal_sports:

Here are some comments:

  • Nice idea to use pre for the <address>. You could also use <br> tags. That’s one of the cases where it’s fine to use them.
  • For the source of the quote on the last line it would be better to use <cite> instead of <em>.
  • Everything else looks fine.

I don’t quite understand what you mean. Could you explain a bit more?

Have a nice day,
Michael

Thank you for assessing my work. :pray:

My previous question is that I want the text in different blocks to be aligned. For example, I want to force the text in <address> and <p> to be aligned where I want. How can I achieve this? Is this need to write codes in CSS?

1 Like

When I use this kind of codes, there will be an extra text in <address>. Therefore, the text in <address> and <p> aren’t be aligned.

 <address>
        <strong>Miss Eileen Daver</strong><br>
        4321 Cliff Top Edge<br>
        Dover, CT9 XXX<br>
        UK<br>
</address>
<main>
    <article>
        <p>Re...</p>

if I use this kind of codes, which were attached in previous link CodePen , this can solve that problem.

     <address>
<strong>Miss Eileen Daver</strong><br>
4321 Cliff Top Edge<br>
Dover, CT9 XXX<br>
UK<br>
    </address>
        <main>
            <article>
                <p>Re...</p>

I want the codes to look neat like the first codes. And the text can also be aligned.
So I would like to know the more rigorous way of writing codes.

1 Like

Ahh, I think I get it now.
Normally, browsers ignore white space at the start and end of the line. This doesn’t happen in your code because you used white-space: pre-wrap;. Using white-space: pre-line; would be a better choice, I think. This will still wrap the lines, but doesn’t preserve the white space at the beginning.

It works!!! Thank you so much :pray:

1 Like

I’m glad we could solve it. :blush: