HTML - tags - e....

revision:


Content

"em" tag : marks text that has emphasis "embed" tag : embeds external content in a document


"em" tag : marks text that has emphasis

top

The <em> tag marks/defines text that has emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis. The content inside is typically displayed in italic. A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.

Attributes: this element includes the global attributes and does not contain any specific attribute in HTML.

Syntax : <em> . . . </em>

some examples

example

Get out of bed now!

code:
                <p class="spec">Get out of bed <em>now</em>!</p>
            

example

We had to do something about it.

code:
                <p class="spec">We <em>had</em> to do something about it.</p>
            

example

This is not a drill!

code:
                <p class="spec">This is <em>not</em> a drill!.</p>
            

example

In HTML 5, what was previously called block-level content is now called flow content.

code:
                <p class="spec">In HTML 5, what was previously called <em>block-level</em> content is now called <em>flow</em> content.</p>
            


"embed" tag : embeds external content in a document

top

The <embed> HTML element embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in. It defines a container for an external resource, such as a web page, a picture, a media player, or a plug-in application.

Attributes: the <embed> element includes the global attributes and also supports the following attributes:

height : the displayed height of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.

src : the URL of the resource being embedded.

type : the MIME type (or media type) to use to select the plug-in to instantiate.

width : the displayed width of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.

Notes:

Use the "object-position" property to adjust the positioning of the embedded object within the element's frame, and the "object-fit" property to control how the object's size is adjusted to fit within the frame.

Use the "title" attribute on an embed element to label its content so that people navigating with assistive technology - such as a screen reader - can understand what it contains.

To display a picture, it is better to use the "<img> tag"; to display HTML, it is better to use the "<iframe> tag"; to display video or audio, it is better to use the "<video>" and "<audio>" tags.

Keep in mind that most modern browsers have deprecated and removed support for browser plug-ins, so relying upon <embed> is generally not wise if you want your site to be operable on the average user's browser.

Syntax: <embed type=" " src=" " width=" " height=" ">

some examples

example
code:
                <div class="spec">
                    <embed class="example" type="image/jpg" src="../pics/5.jpg" width="300" height="200" title="holidays">
                </div>
            

example
code:
                <embed class="example" type="text/html" src="demo_iframe.htm"  width="400" height="200">
            

example
code:
                <embed src="../pics/blog-20-12-05.pdf" type="application/pdf" width="100%" height="300px" />