Home Tutorials Exercises About Us
�It's so hard to forget pain, but it's even harder to remember sweetness. We have no scar to show for happiness. We learn so little from peace.� (c) Chuck Palahniuk, Diary


�You will never be happy if you continue to search for what happiness consists of. You will never live if you are looking for the meaning of life.� (c) Albert Camus


�Count your age by friends, not years. Count your life by smiles, not tears.� (c) John Lennon


�Every man has his secret sorrows which the world knows not; and often times we call a man cold when he is only sad.� (c) Henry Wadsworth Longfellow


�If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.� (c) J.R.R. Tolkien

Images

The img tag is used to put an image in an HTML document and it looks like this:


<img src="http://xerometer.com/30cool-tumblr-pictures/" width="120" height="90" alt="Tumblr">

The src attribute tells the browser where to find the image. Like the a tag, this can be absolute, as the above example demonstrates, but is usually relative. For example, if you create your own image and save it as “myselfie.jpg” in a directory called “images” then the code would be <img src="images/myselfie.jpg"... The alternative way of copying or geting the url of your picture, drag your picture into your default browser and just copy there its url.

The width and height attributes are necessary because if they are excluded, the browser will tend to calculate the size as the image loads, instead of when the page loads, which means that the layout of the document may jump around while the page is loading.

The alt attribute is the alternative description. This is an accessibility consideration, providing meaningful information for users who are unable to see the image (if they are visually impaired, for example).

Note that, like the br tag, because the img element does not enclose any content, no closing tag is required.


Videos

HTML Video - Using <embed>

The <embed> tag defines a container for external (non-HTML) content.

The following HTML fragment displays a Flash video embedded in a web page:

Example

<embed src="http://www.youtube.com/watch?v=tA53EsnzlIg" height="200" width="200">

Embedding Videos Attributes

  • autoplay = "autoplay" or "" (empty string) or empty
    Instructs the UA to automatically begin playback of the video as soon as it can do so without stopping.
  • loop = "loop" or "" (empty string) or empty
    Instructs the UA to seek back to the start of the video upon reaching the end.
  • height = non-negative integer
    The height of the video, in CSS pixels.
  • width = non-negative integer
    The width of the video, in CSS pixels.
  • muted = "muted" or "" (empty string) or empty
    Represents the default state of the audio channel of the video, potentially overriding user preferences.

Related Pages


Copyright � Juine Arvie Lavarias. All Rights Reserved. 2014