Computer Language/Web
[Web] Html - Attribute
정우섭
2020. 7. 17. 18:38
Attribute
Attribute is used if tag have lack of information.
For example, <img> tag is used for putting an image in the page.
<h1>HTML</h1>
<p>Hello HTML<br>
Let's start!<br>
Here comes an image<br></p>
<img>
<p>Can't find out the image</p>
<img> tag doesn't work, because there's no information about which image to call.
So 'attribute' is used in this kind of situation, and by adding it expression of 'html' got more affluent.
Put downloaded image in editor you use, and call it.
<h1>HTML</h1>
<p>Hello HTML<br>
Let's start!<br>
Here comes an image<br></p>
<img src=nameOfImageFile.jpg>
<p>What a image!</p>
By using attribute 'src'(abbreviation of scource) you can input the information of image.
And there are a lot of attributes as tags.
A tag can use many attributes at once, but remember it can only use attributes which fit in the tag.
So the number of attributes that each tags can use are different tag by tag.
Attribute Searcher