在網易博客中,若要加入自定義 HTML,可透過「裝扮博客」或「添加自定義模塊」的入口貼上代碼。完成後,記得儲存並將模塊拖曳到想要的位置。
<a href="https://example.com" target="_blank">顯示文字</a>
其中 target="_blank" 可讓連結在新視窗開啟。
<a href="https://example.com" target="_blank"> <img src="https://example.com/image.jpg" width="150" height="50" alt="提示文字" /> </a>
width 與 height 可控制圖片顯示尺寸,alt 則提供替代文字。
若平台支援嵌入 Flash 或 iframe,可貼上對應代碼。常見做法是先將影片上傳至支援服務,再取得嵌入代碼貼入自定義模塊。
<embed src="影片網址" width="100%" height="350" autostart="0" />
可使用 marquee 製作簡單滾動效果:
<marquee behavior="scroll" direction="right" width="90%" height="100">
<a href="https://friend1.example.com">
<img src="https://example.com/avatar1.jpg" width="100" height="100" alt="好友1" />
</a>
</marquee>若要顯示多個好友,可重複加入多組 <a> 與 <img>。direction 可調整為 left、up 或 down。
這類寫法多屬於早期部落格平台的相容做法。現代網站若重新實作,建議優先使用語義化 HTML、CSS 與無障礙設計,避免過度依賴非標準標籤。