使用 HTML 決定廣告在網站上的刊登位置
您可以使用 HTML 標記 (<div>、<table> 等) 更改 Google 廣告的位置,就像安排網站上其他元素 (圖片、文章等) 一樣。舉例來說,如果您使用 <div align="center"> 和 </div> 這兩個 HTML 標記包圍住廣告程式碼,廣告會顯示在網頁中央。
<html>
<head> 這部分為頁首。 <title>HTML 範例網頁</title> </head> <body> 這部分為網頁內文。
<div align=”center”>
<script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– Homepage Leaderboard –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:728px;height:90px”
data-ad-client=”ca-pub-1234567890123456″
data-ad-slot=”1234567890″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</body>
</html>
<head> 這部分為頁首。 <title>HTML 範例網頁</title> </head> <body> 這部分為網頁內文。
<div align=”center”>
<script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– Homepage Leaderboard –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:728px;height:90px”
data-ad-client=”ca-pub-1234567890123456″
data-ad-slot=”1234567890″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</body>
</html>
更多?來源:https://support.google.com/adsense/answer/9190028?hl=zh-Hant