「html」imgタグで文書に画像を埋め込むサンプル

2021年8月24日

構文
1.src 属性は必須で、埋め込みたい画像へのパスを入れます。
2.alt 属性は画像のテキストによる説明

使用例1

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<img src="/img/title.gif" width="300" height="31" border="0" alt="test data introduction">
<img src="/img/title.gif" width="300" height="31" border="0" alt="test data introduction">
<img src="/img/title.gif" width="300" height="31" border="0" alt="test data introduction">

使用例2

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<img class="cftpic"
src="/media/test.jpg"
alt="1111">
CSSコード
.cftpic {
width: 250px;
}
<img class="cftpic" src="/media/test.jpg" alt="1111"> CSSコード .cftpic { width: 250px; }
<img class="cftpic"
     src="/media/test.jpg"
     alt="1111">
CSSコード
.cftpic {
    width: 250px;
}

 

Html

Posted by arkgame