Placing Text Next to a YouTube Video in WordPress

By Andrew Meer

Make your post flow seamlessly by wrapping text around YouTube videos.
i Medioimages/Photodisc/Photodisc/Getty Images

Although WordPress allows you to insert YouTube videos via HTML embed codes during post creation, any videos when posted appear at the center of the screen, thus leaving vacant spaces void of any text on both sides. You can, however, make use of this space by making text appear either to the left or to the right of an embedded YouTube video. To accomplish this, edit your post to place HTML float codes surrounding the embed code.

Sign in to your WordPress dashboard, click “My Blog,” and then click “Posts” under an available blog.

Click the “Edit” link under a post, then click the “Text” tab on the post editing screen.

Locate the HTML embed code of the YouTube video. To float the YouTube video to the left and make text appear to the right, add <div style="float:left;margin:0 10px 5px 0;"> just before the embed code, and </div> at the end of the embed code. To float the YouTube video to the right and make text appear to the left, add <div style="float:right;margin:0 10px 5px 0;"> to the beginning of the embed code instead. Repeat for any other YouTube embed codes within the post.

Click “Update” under the Publish section. Click “Preview Changes” to verify that text has appeared next to the video.


To instantly locate YouTube embed codes within a post, press “Ctrl-F” and enter “” (without quotes). Embed codes are usually surrounded by square brackets and look something like "[youtube=;w=560&amp;h=315].

You can also accomplish this task during post creation.


Refrain from leaving any spacing between the float code and the YouTube embed code.