Doubt - Assessment wanted for Marking up a letter

Hello, I have a doubt in marking up a letter, which is: the first date in the letter is supposed to be inside a tag besides <time>? I had to add display:block in sender-column class to right align properly. I also appreciate any additional feedback.

Here is my code: https://codepen.io/EdiJr/pen/JjYRNYo

Hi @Edi! Welcome to our community, and thanks for sending in your code!

Your work is really good — congratulations on some great work. I could not find anything wrong with it, apart from the small issue you talk about.

The reason you had to do this is because <time> is an inline element by default, which among other things means that it won’t with positioning type styles like text-align. Block-level elements do accept those styles , hence display:block fixing it.

But also, <time> is really supposed to be nested inside a paragraph in a context such as a letter, which is block-level by default, so I think the best fix for this particular case would be to do:

<p class="sender-column"><time datetime="2016-01-20">20 January 2016</time></p>

Then you don’t need the extra display:block declaration.

1 Like

Thanks for your warm welcome, I also appreciate your help!