Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the font awesome showing up three times?

<div class="Contact-form">
        <div id= "form-area" class="sadaka-form">
            <h2>CONTACT FORM</h2>
            <input type="text" name="Name" placeholder="Name*">
            <input type="email" name="email" placeholder="E-mail*" >
            <textarea name="message" placeholder="Message*" cols="30" rows="10"></textarea>
            <button class= "form-control">Send message</button>
        </div>
        <div id= "contact-area" class="sadaka-contacts">
            <h3>SADAKA CONTACTS</h3>
            <p>Sadaka ipsum dolor sit amet, consectetur adipiscing elit. Ut at eros rutrum turpis viverra elementum semper quis ex. Donec lorem nulla .</p>
            <ul>
                <li><span><i class="fa fa-map-marker"></span></li>
                <li><span><i class="fa fa-phone"></span></li>
                <li><span><i class="fa fa-envelope"></span></li>
            </ul>
        </div>
    </div>

my problem is that the font awesome icon is showing up three times. i dont know where am i doing wrong ? i have included the link to the error screenshot as well.

Here is the image enter image description here

like image 201
Tarique Avatar asked Nov 15 '25 07:11

Tarique


2 Answers

The correct way to use FontAwesome icons is: <i class="fas fa-map-marker"></i> (look at the final </i> tag).

In your case:

<li><span><i class="fa fa-map-marker"></i></span></li>
<li><span><i class="fa fa-phone"></i></span></li>
<li><span><i class="fa fa-envelope"></i></span></li>
like image 74
marcanuy Avatar answered Nov 17 '25 21:11

marcanuy


The i tag should be closed.

<ul>
    <li><span><i class="fa fa-map-marker"></i></span></li>
    <li><span><i class="fa fa-phone"></i></span></li>
    <li><span><i class="fa fa-envelope"></i></span></li>
</ul>

The i tag is not an empty html tag nor a solidus tag and hence needs a closing tag

like image 34
prabhat gundepalli Avatar answered Nov 17 '25 22:11

prabhat gundepalli