0
make 2 tags in the same line
hello all, how can i make those two tags in one line : in the html code, i have : <strong class="title"> Caractéristiques : </strong> <div> caractéristique1 </div> i have as a result : Caractéristiques : caractéristique1 i should have as a result : Caractéristiques : caractéristique1
4 odpowiedzi
+ 2
Ah Zong s answer is correct. But if you want to have the div inside the code, but still having the inline effect then you have to use CSS.
example styles.css
div {
display: inline;
/*divs have the block as the default value to the display value. Changing it to inline will do your job */
}
+ 1
A <div> element is what we call a block element. That is, when you include the element in your HTML code, it automatically insert a line break and the element is presented with a box.
To fix this, you should use inline elements such as span:
<strong class="title"> Caractéristiques : </strong>
<span> caractéristique1 </span>
+ 1
Ah Zong , Seniru Pasan thank you, in fact I could not change the html, so I will just add the inline property to CSS. ;)
+ 1
Oumaima if you want to keep this in HTML tab, you can use the style attribute with the div tag.