Technology Software

How to Add Text in HTML Above an Embedded Object

    • 1). Open the HTML file for your Web page in a code editor such as jEdit, NotePad++ or BBEdit. Locate the opening and closing <object> tags. Between those tags, you will often see <param> tags and one <embed> tag.

    • 2). Add text either above or below the <object> tags. Wrap the text in an appropriate HTML tag such as <h1> for a large heading or <p> for a paragraph of text. If you want to position the text using CSS code, set the "ID" attribute to a unique, meaningful name you can remember later. Text in a paragraph with an "ID" attribute looks like this:

      <p>Here is some text.</p>

    • 3). Open the CSS file for your Web page. If your page doesn't use an external CSS file, or if you don't know whether it does or not, look between your <head> and </head> tags in the HTML file. If you don't see <style> tags, add <style> and </style> between the <head> tags. You can add CSS code directly to an external CSS file or between the <style> tags.

    • 4). Position your text using CSS code, if desired. The following code, for example, makes a paragraph 200 pixels wide and then floats it to the left:

      p #my-text {

      width: 200px;

      float: left;

      }

      Since you placed the <p> tag adjacent to the <object> tag, it will float to the left of your <object> content. Note that "#my-text" is targeting a <p> tag with an "ID" set to "my-text," and the hash sign denotes an "ID" attribute.

Leave a reply