2017-06-19 19 views
-1

と合併しているこれは私のコードです:HTMLのハイパーリンクは、他の段落タグ

<!DOCTYPE html> 
<html> 
<head> 
<link rel="stylesheet" type="text/css" href="theme.css"> 
<title>Abbas Maheryar - Inquiries</title> 
</head> 
<body> 
<center><h1>Inquiries</h1></center> 
<h3><u>Use this information to contact me</u></h3> 
<div> 
<center><p><b>Phone:</b=> 818-857-0846 
<p><b>Email:</b></p><a href="mailto:[email protected]?Subject=Service Inquiry"target="_top"><p>[email protected]</p> 
</center> 
</div> 
<div> 
<p>Inquiries</p> | <a href="./news.html"><p>News</p> 
</div> 
</body> 
</html> 

私の問題は、私は私の電子メールをリンクしようとすると、それはまた、下部のお問い合わせをダウンリンクしていることです。これを修正するにはどうすればよいですか?あなたは</a>に近いメールのハイパーリンクを忘れてしまったので、

+0

すぎtheme.cssを追加してください? –

答えて

0

意味的に正しいHTMLは次のようになります。

<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 
    <link rel="stylesheet" type="text/css" href="theme.css"> 
 
    <title>Abbas Maheryar - Inquiries</title> 
 
</head> 
 

 
<body> 
 
    <center> 
 
    <h1>Inquiries</h1> 
 
    </center> 
 
    <h3><u>Use this information to contact me</u></h3> 
 
    <div> 
 
    <center> 
 
     <p> 
 
     <b>Phone:</b> 818-857-0846 
 
     </p> 
 
     <p> 
 
     <b>Email:</b> 
 
     <a href="mailto:[email protected]?Subject=Service Inquiry" target="_top"> 
 
     [email protected] 
 
     </a> 
 
     </p> 
 
    </center> 
 
    </div> 
 
    <div> 
 
    <p> 
 
     Inquiries | <a href="./news.html">News</a> 
 
    </p> 
 
    </div> 
 
</body> 
 

 
</html>

0

あなたのハイパーリンクは、一緒に実行されています。

<a href="mailto:[email protected]?Subject=Service Inquiry"target="_top"><p>[email protected]</p></a> 

ニュースハイパーリンクを閉じる必要があります。ハイパーリンクを続けると、同じハイパーリンクが表示されます。これは、同様に閉じている必要があります

<a href="./news.html"><p>News</p></a> 

はまた、これはサポートされていないHTML4でマークアップ、およびflaky in HTML5あるよう<p>タグがないは、<a>タグ内だなければならないことに注意してください。あなたが探している完全なマークアップがある

<p><a href="mailto:[email protected]?Subject=Service Inquiry"target="_top">[email protected]</a></p> 
<p><a href="./news.html">News</a></p> 

<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 
    <link rel="stylesheet" type="text/css" href="theme.css"> 
 
    <title>Abbas Maheryar - Inquiries</title> 
 
</head> 
 

 
<body> 
 
    <center> 
 
    <h1>Inquiries</h1> 
 
    </center> 
 
    <h3><u>Use this information to contact me</u></h3> 
 
    <div> 
 
    <center> 
 
     <p><b>Phone:</b> 818-857-0846 
 
     <p><b>Email:</b></p> 
 
     <p> 
 
     <a href="mailto:[email protected]?Subject=Service Inquiry" target="_top"> 
 
     [email protected]</a> 
 
     </p> 
 
    </center> 
 
    </div> 
 
    <div> 
 
    <p>Inquiries</p> | 
 
    <p> 
 
     <a href="./news.html">News</a> 
 
    </p> 
 
    </div> 
 
</body> 
 

 
</html>

代わりに、あなたはあなたのリンクの外にあなたの段落を移動し、このようなコードのあなたの二つのブロックを構築する必要があります

希望します。 :)

関連する問題