2017-07-06 3 views
-4

I'm making a website (for schoolwork) using a combination of php, html and css. I'm currently working on the initial design stages of my site and as I'm inexperienced at html/css, I am going slowly through tutorials trying to learn.は次のように私のバナーが見えハイパーリンクを含めないHMTL <a href> hyperlink not appear as a hyperlink

Including the hyperlink my banner looks like:banner with hyperlink

ください。

必要なコードは次のとおりです。

<html> 
    <head> 
     <link rel="stylesheet" type="text/css" href="style.css"> 
    </head> 
    <center> 
    <div id = "indexBackgroundOne"><h2 style="font-family:verdana"> Q U E S T S &reg;</h2></div> 
    </center> 
</html> 

ありがとう!

答えて

2

を、あなたは次のように使用することができます -

<html> 
    <head> 
     <link rel="stylesheet" type="text/css" href="style.css"> 
    </head> 
    <center> 
    <div id = "indexBackgroundOne"><h2 style="font-family:verdana;text-decoration: none;color:black;"><a href="" style="text-decoration: none;color:black;"> Q U E S T S &reg;</a></h2></div> 
    </center> 
</html> 
0

ここ

#indexBackgroundOne h2 a{ 
    text-decoration: none; 
    color:black; 
} 

あなたのstyle.cssファイルでこれを試すには、サンプルコードです:

<html> 
 
    <head> 
 
     <link rel="stylesheet" type="text/css" href="style.css"> 
 
    </head> 
 
    <style> 
 
    #indexBackgroundOne h2 a{ 
 
     text-decoration: none; 
 
     color:black; 
 
    } 
 
    </style> 
 
    <center> 
 
    <div id = "indexBackgroundOne"><h2 style="font-family:verdana"> Q U E S T S &reg;</h2></div> 
 
    </center> 
 
</html>

+0

CSSのどれもが、これはリンク – Mindless

+0

@Mindlessを含んでいません、申し訳ありません、今それがありません – user10089632

0

は、所望の効果のためにこれを試してみてください。

.no-style { 
 
    text-decoration: none; 
 
    color: black; 
 
}
<center> 
 
    <div id = "indexBackgroundOne"> 
 
     <h2 style="font-family:verdana"> 
 
      <a href="" class="no-style">Q U E S T S &reg;</a> 
 
     </h2> 
 
    </div> 
 
</center>

か、インラインスタイルしたい場合:あなたはインラインCSSを使用している場合

<center> 
 
    <div id = "indexBackgroundOne"> 
 
     <h2 style="font-family:verdana;"> 
 
      <a href="" style="text-decoration:none;color:black;"> Q U E S T S &reg; 
 
      </a> 
 
     </h2> 
 
    </div> 
 
</center>

0

.noline{ 
 
text-decoration:none; 
 
}
<html> 
 
    <head> 
 
     <link rel="stylesheet" type="text/css" href="style.css"> 
 
    </head> 
 
    <center> 
 
    <div id = "indexBackgroundOne"><a class="noline"href="#your link"><h2 style="font-family:verdana"> Q U E S T S &reg;</h2></a></div> 
 
    </center> 
 
</html>

あなたは、クラスを作成し、それを追加して、テキストの装飾を行うことができます。

関連する問題