I am completely new to CSS and HTML and have just embarked on my first CSS challenge. Specifically, this one.
The winning solution is as follows:
:after{width:70;content:'Hello World
However, I am quite puzzled by this and other solutions provided on the page. I understand that the objective is to keep the code concise and clean, but is this format suitable for real-world web development? Should I follow this coding style in practice? While I see that the code accomplishes the desired result for this particular challenge, I am concerned about missing characters like apostrophes, semicolons, and brackets. I want to make sure I am learning the correct methods and not adopting bad practices in general.
I have come up with my own solution that also yields the expected outcome (though I am unsure if it is considered good coding practice or if it could potentially cause issues in a real website development scenario):
.box:before {
content:"Hello World";
word-spacing: 200px;
text-align: center;
}
Why does the challenge's winning solution differ from mine?