While YouTube provides you with the code you need to share a video for free, they don’t help with the process of laying it out on your website or blog. Fortunately, YouTube’s video embed code is just an ordinary HTML iframe. If you encapsulate this code within a tag, you can use the CSS or Cascading Style Sheet property text-align to display your video in the center of your blog post or Web page. Step 1 Launch a plain-text editor like Notepad and type the HTML div code to center the YouTube video iframe. For example, type the following code in to your editor: Include a space before "" to hold the video’s embed code later. This div contains the CSS code that will tell the viewer’s browser to center the video. Step 2 Click “Share” on the YouTube video you want to share and then click “Embed.” Step 3 Select the iframe code in the text box and press “Ctrl-C” to copy it to the clipboard. Step 4 Select the editor window, click the empty space before the "" code, and then press “Ctrl-V” to paste the embed code. Your code should now resemble the following: Include a space before "