Tuesday, August 13, 2013

เปลี่ยนรูปไอคอนที่ Tab ด้านบนของ Browser

ขั้นแรกเราต้องสร้างไอคอนที่ต้องการขึ้นมาก่อนด้วยโปรแกรมสร้างไอคอนอะไรก็ได้ โดยกำหนดให้ต้องมีขนาดเป็น 16×16 True Colour เช่น ต้องการเปลี่ยนรูปไอคอนด้านบนเป็น tonnark.ico (tonnark.ico)
ไฟล์ html สามารถทำได้โดยการแทรก tag ไว้ที่ส่วน header ของไฟล์ html ได้เลยเช่น
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tonnark.info</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<link rel="shortcut icon" href="tonnark.ico" type="image/x-icon" />
<link rel="icon" href="tonnark.ico" type="image/x-icon" />
</head>
<body>
.......
.......
.......
</body>
</html>

ถ้าเป็น WordPress ไฟล์ header จะชื่อ header.php อยู่ในโฟลเดอร์ของ theme ที่ใช้เช่น /wp-content/themes/twentytwelve/header.php

No comments:

Post a Comment