Читать книгу CoderDojo: My First Website - Clyde Hatter - Страница 15
ОглавлениеTHINGS TO DO NEXT
Try adding some of your own photographs to the page. Add a few selfies!
WORDS TO REMEMBER
Attribute – tags sometimes contain additional information held inside attributes. In the example of the img tag below we can see that there are two attributes: src and alt.
<img src="images/DSC03730.jpg" alt="Holly playing the guitar"/>
Attributes always consist of an attribute name (such as src or alt) followed by an = sign and then by the attribute value contained inside straight quote marks, for example "images/DSC03730.jpg".
The src (source) attribute tells the browser where to look for the image. The alt (alternative) attribute holds text that will appear if the image cannot be displayed, or if it will be read aloud by screen-reading software.
Element – An element is anything between a start tag and an end tag of the same type. So an li element is everything between an <li> start tag and an </li> end tag.
Empty element – Some elements don’t have separate start and end tags: they are called empty elements. Examples are:
Instead of having a separate end tag they have just a single tag which ends with a forward slash before the closing angle bracket.
<img src="images/DSC03730.JPG" lt="Holly playing a G chord on the guitar"/> <br/>
MORE ONLINE
Adding pictures to pages – http://nano.tips/addpics Making pictures the right size – http://nano.tips/picsize
img – the image element br – the line-break element