2017-01-08 5 views
-1

Ich möchte Einrückung wie das angehängte Dokument machen. Ich habe versucht,Einrückung in HTML

<style type="text/css"> 
.tab { margin-left: 40px; } 
</style> 

echo "<strong> Introduction: </strong> 
<p class='tab'> 
This is the introduction. This is the introduction. This is the  introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. 
</p>"; 

enter image description here Aber die gewünschte Ausgabe nicht erhalten. Ich möchte keinen separaten Absatz. Irgendwelche Hilfe bitte.

+0

Sorry, kann nicht verstehen ... was wollen Sie tun? – Danielius

Antwort

0

Geben Sie Ihrem starken Element einen Float-Wert nach links und einen weiteren Rand zum p-Element, der gleich oder größer als die Textbreite des starken Elements sein soll.

<style type="text/css"> 
 
.tab { margin-left: 100px; } 
 
strong {float:left;} 
 
</style> 
 

 
<strong> Introduction: </strong> 
 
<p class='tab'> 
 
This is the introduction. This is the introduction. This is the  introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. 
 
</p>