I have written some HTML code inside PHP with echo as below:
echo '<a class = "fragment" href = "'.$row['url'].'" target = "_blank" >';
echo '<div>';
echo "Title: $title"; echo '<br/>';
echo "URL:"; echo '<h4>' .$url. '</h4>';
echo "Preview : $preview"; echo '<br/>';
echo "Image url: $image"; echo '<br/>';
echo '</br>';
echo '</div>';
echo '</a>';
Problem is $url
appears on a new line and in bold text. Though i have not used here <b>
or <br/>
before and after it.
How can I show it like
URL : www.url.com
same like other parameters appears?
CSS effect appears properly.
css for h4:
.fragment h4
{
padding: 0;
margin: 0;
color: #000;
}
.fragment h4:hover
{
background-color:#ccc;
text-decoration: underline;
}