Issue
I have two h1 side by side and I want a space between the two textes.I tried it with just adding space with the spacebar, but it doesn´t work.
header div {
display: flex;
}
<header>
<div>
<h1 id="heading1">Hello my name is </h1>
<h1 id="heading2"> Paul</h1>
</div>
</header>
Solution
Try using
It's a dedicated HTML character attributed to "space".
Example:
<div>
<h1>Hello my name is</h1>
<h1>Paul</h1>
</div>
You can also put it inside of HTML tags, like the <h1>
, but I personally prefer it outside of it.
I also personally prefer using
in general since it's a more explicit way to symbolize "space", whereas implicit spaces (" "
) sometimes get "lost in translation", so to speak..
Answered By - tomleb
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.