How to embed a code on a web page - Nigeria News, Africa News, World News - Nollywood Times

Breaking

Post Top Ad

Tuesday, October 6, 2020

How to embed a code on a web page

Image credit: Wikipedia

This article describes how to <EMBED ...> tags to plugins on a web page. Plugins gives special features to a webpage.

<EMBED ...> help put a browser plugin on any web page. A plugin is a special program located on the client computer (i.e. not on your web server) that handles its own special type of data file.

The most common plugins are for sounds, videos, news and movies. The embed tag gives the location of a data file that the plugin should handle.

The <EMBED ...> simply uses the SRC attribute to indicate the location of any plugin data file, and usually also gives a WIDTH and HEIGHT of the plugin area. For example, the following code from Twitter embeds a news story on a web page:

 <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Wizkid Partners With Puma For “Made in Lagos” Inspired Jersey - Nigeria News, Africa News, World News - Nollywood Times <a href="https://t.co/OTZeruBvl6">https://t.co/OTZeruBvl6</a></p>&mdash; NollywoodTimes (@NollywoodTimes) <a href="https://twitter.com/NollywoodTimes/status/1312760629250400259?ref_src=twsrc%5Etfw">October 4, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

However <EMBED ...> is said not to be part of the HTML 4 or xHTML 1 specifications, but it is still widely supported by modern browsers.

Unlike other codes, the attributes used by <EMBED ...> depend on the type of plugin being used (this odd free-attribute concept is why <EMBED ...> has been rejected by the HTML standards makers).

The only required attribute for <EMBED ...> is SRC. 

SRC indicates where to get the media object to be embedded on a web page

Other attributes to <EMBED ...> includes:
    WIDTH: width of area in which to show resource
    HEIGHT: height of area in which to show resource
    ALIGN: how text should flow around the picture
    NAME: name of the embedded object
    PLUGINSPAGE: where to get the plugin software
    PLUGINURL: where to get the JAR archive for automatic installation
    HIDDEN: if the object is visible or not
    HREF: make this object a link
    TARGET: frame to link to
    AUTOSTART: if the sound/movie should start automatically
    LOOP: how many times to play the sound/movie
    PLAYCOUNT: how many times to play the sound/movie
    VOLUME: how loud to play the sound
    CONTROLS: which sound control to display
    CONTROLLER: if controls should be displayed
    MASTERSOUND: indicates the object in a sound group with the sound to use
    STARTTIME: how far into the sound to start and stop
    ENDTIME: when to finish playing

So to embed a code for a tweet from Twitter, go to the tweet, on the right corner, your will see three dots, right click it and a drop down menu will be unfolded.

Among the list, choose embed tweet and take it to the HTML section of the web page you want it embedded.

Eg: This tweet below is embedded.


No comments:

Post a Comment

Post Bottom Ad