Categories
HTML Web development

How to embed the YouTube video in HTML?

How to embed the YouTube video in HTML?

One of the easiest ways to play videos in HTML is to use YouTube.

Converting videos to formats acceptable in HTML (Mp4, WebM, Ogg) can be difficult and time-consuming. The easier way to let the video play on your website is using YouTube.

Use an <iframe> element to embed the video on the website:

<!DOCTYPE html>
<html>
<body>

<iframe src="https://www.youtube.com/embed/o5daeOwl-4Q">
</iframe>

</body>
</html>

Output:

Each YouTube video has a unique Id (like o5daeOwl-4Q). To check which Id has your chosen video open to video in YouTube and press on the Share button (in the new window, you will see the Id number).

YouTube embed video

Note: By pressing the button Share you can use the option Embed <> to get ready code which you can paste into your HTML document, however, if you want to set your own settings (like dimension, autoplay, loop, etc…) and learn how to write the code by yourself follow the steps below.

By using the height and width attributes you can define the dimension of the player:

<!DOCTYPE html>
<html>
<body>

<iframe width="100%" height="400" src="https://www.youtube.com/embed/o5daeOwl-4Q">
</iframe>

</body>
</html>

Output:

An <iframe> with a specified width of 100% and a height of 400px:

You can let your video start playing automatically when a user visits your website, by adding autoplay=1 to the YouTube URL. Automatically starting video can be annoying for your website visitors so you can set the muted autoplay by adding mute=1 after autoplay=1 to let your video start playing automatically (but muted):

<!DOCTYPE html>
<html>
<body>

<iframe width="100%" height="400" src="https://www.youtube.com/embed/o5daeOwl-4Q?autoplay=1&mute=1">
</iframe>

</body>
</html>

Output:

The video will play once when the value is set to 0 (default), with the value 1 the video will loop (forever). Add loop=1 to let your video loop forever:

<!DOCTYPE html>
<html>
<body>

<iframe width="100%" height="345" src="https://www.youtube.com/embed/o5daeOwl-4Q?loop=1">
</iframe>

</body>
</html>

Output:

To not display controls in the video player set the controls=0, to display the controls in the video player set the controls=1 (default):

<!DOCTYPE html>
<html>
<body>

<iframe width="100%" height="345" src="https://www.youtube.com/embed/o5daeOwl-4Q?controls=0">
</iframe>

</body>
</html>

Output:

Enjoy coding!

Categories
HTML Web development

HTML iframe tag

HTML iframe tag

The HTML <iframe> tag defines an inline frame. The inline frame is used to embed another document within the HTML document.

Syntax:

 <iframe src="url" title="description"></iframe> 

Example:

An <iframe> in its simplest use. Embedding another document within the current HTML document:

<!DOCTYPE html>
<html>
<body>

<iframe src="https://www.lenastanley.com/" title="lena design">
</iframe>

</body>
</html>

Output:

Attributes:

allowfullscreen (value- true/ false) – the <iframe> element can activate fullscreen mode by calling the requestFullscreen() method (true).

allowpaymentrequest (value- true/false) – can be allowed to invoke the Payment Request API (true).

height (value- px) – defines the height of an (default height is 150 px).

Syntax:

<iframe height="pixels"> 

Example:

<!DOCTYPE html>
<html>
<body>

<iframe src="https://www.lenastanley.com/" height="300" title="lena design">
</iframe>

</body>
</html>

Output:

An with a specified height of 300 px:

loading (value- eager, lazy) – defines whether a browser should load an iframe immediately or defer the loading of iframes until some conditions are met.

name (value- text) – defines the name of an <iframe>.

referrerpolicy (value- no-referrer/ no-referrer-when-downgrade/ origin/ origin-when-cross-origin/ same-origin/ strict-origin-when-cross-origin/ unsafe-url) – defines which referrer information to send when fetching the iframe.

sandbox (value- allow-forms/ allow-pointer-lock/ allow-popups/ allow-same-origin/ allow-scripts/ allow-top-navigation) – Enables an extra set of restrictions for the content in an <iframe>.

src (value- URL) – defines the address of the document to embed in the <iframe>.

srcdoc (value- HTML_code) – defines the HTML content of the page to show in the <iframe>.

width (value- px) – defines the width of an (default width is 300 px).

Syntax:

<iframe width="px"> 

Example:

<!DOCTYPE html>
<html>
<body>

<iframe src="https://www.lenastanley.com/" width="640" title="lena design">
</iframe>

</body>
</html>

Output:

An <iframe> with a specified width of 640 px:

You can add the style attribute and use the CSS height and width properties, and remove/add the <iframe> border:

<!DOCTYPE html>
<html>
<body>


<p>An iframe with a thick black borde</p>
<iframe src="https://www.lenastanley.com/" width="100%" height="300" style="border:5px solid black;">
</iframe>

<p>An iframe with no borders:</p>
<iframe src="https://www.lenastanley.com/" width="100%" height="300" style="border:none;">
</iframe>

</body>
</html>

Output:

An iframe with a thick black border:

An iframe with no borders:

Enjoy coding!

Categories
Photoshop

How to create a Bokeh Effect Wallpaper with text in Photoshop?

In this tutorial, you will learn to create a Bokeh Effect Wallpaper with text in Photoshop CS6. The Bokeh Effect is the way a camera lens treats out-of-focus points of light. The term “Bokeh” comes from the Japanese word and means “blur” or “blur quality”. Follow the steps below and watch the video tutorial.

Bokeh Effect Photoshop

Step 1:


Open a colorful image that you’d like to use to create your Bokeh effect. Set the resolution on your image 150px and the size of your picture.

Photoshop Bokeh Effect

Step 2:


Go to Filter->Blur->Gaussian Blur and set the Radius to 65px and press Okay.

Bokeh Wallpaper
Bokeh Wallpaper Photoshop

Step 3:


We’ll darken the mid-tones by clicking on the adjustment layer and selecting Curves

Bokeh Effect Photoshop

Go to the center of the grid and pull it slightly down and to the right.

Bokeh Photoshop

Step 5:


Create a new layer and open the Brush Tool. Open Brush Panel and set up:
Size: 125pxHardness: 100%Spacing: 80%

Bokeh Wallpaper
Bokeh Wallpaper Photoshop

Click Shape Dynamics and make the:
Size Jitter: 50%

The control: FadeAngle

Jitter: 0%

Angle control: off

Bokeh Effect Photoshop

Go to Scattering. Make the Scatter 1000%. Count 1.

Bokeh Effect Photoshop

Step 6:


Now, randomly brush over your image. Change the Blend Mode to “Overlay” and reduce the opacity to 50%.

Bokeh Effect Adobe Photoshop

Go to Filter->Blur->Gaussian Blur. Blur it 16px and click Okay.

Step 7:


Click on the New Layer icon. Change the Blend Mode to “Overlay” and opacity to 50%, and randomly brush over the image.
Go to Filter->Blur->Gaussian Blur. Blur it 12px and click Okay.

Step 8:


Make a new layer, change Blend Mode to “Overlay” and opacity to 50%, and again randomly brush over the image.
Go to Filter->Blur->Gaussian Blur. Blur it 8px and click Okay.

Bokeh Wallpaper Adobe Photoshop

Next, I’ll show you how to add Bokeh text.

Step 1:


Open your “Horizontal Type Tool” and choose the thin font. Set the size around 190px, and select the “sharp” option. Type out your text.

Bokeh Text Effect

Step 2:


Click by the right button of the mouse on the text layer and choose an option Select Pixels

Bokeh Text Effect Adobe Photoshop

Click off the eyeball to the text layer to hide it. Create a new layer.

Bokeh Text Adobe Photoshop

Step 3:


Open the Paths Panel and click on the icon of the upper right. Select Work Path and set 0.5px.

Bokeh Text Effect Photoshop
Bokeh Text Photoshop

Step 4:


Open your Brush Tool and open the Brush Tool Panel. Click “Brush Tip Shape” and make the size 30px, spacing 80% and hardness 100%.

Bokeh Text Effect Adobe Photoshop

Select Shape Dynamics and set the size Jitter 50% and control Off. Minimum diameter 0%. Uncheck Scattering.

Bokeh Text

Click Color Dynamics->Foreground/Background Jitter set to 100%.

Bokeh Text Adobe Photoshop

Transfer:

Opacity Jitter: 0%, control Off
Flow Jitter: 100%

Bokeh Text Effect Photoshop

Step 5:


Click on the icon at the upper right corner of the Paths panel and click Stroke Path.

Bokeh Photoshop

Choose Brush and make sure that “Simulate Pressure” is not checked.

Bokeh Adobe Photoshop

Step 6:


Open back the layers panel and change Blend Mode to Color Dodge. To hide the Work Path hit Cmd+H.

Bokeh adobe Photoshop

Create a copy of the layer. Choose Blending Options->Inner Glow and change the Blend Mode to Color Dodge, and opacity to 50%Source center and hit Okay. Go to Filter->Blur->Gaussian Blur. Blur it 4px and click Okay. Your Bokeh Effect Wallpaper is Ready!

Bokeh Effect Photoshop

You can see also the tutorial video below:

Enjoy!

Read also:

Photoshop Tutorials

How to create Bubbles in Photoshop?

How to make an animated GIF in Photoshop?

Categories
iMovie

How to add a GIF into iMovie?

If you having trouble putting your GIF into iMovie this tutorial is for you! That’s really easy. You can watch the video tutorial, or just follow the steps below to learn how to add GIFS into iMovie. 

imovie gif

Step 1:


Put your GIF on the desktop and start it playing. Then, open the Quick Time Player and hit New Screen Recording.

A little box will pop up with the red dot in. 

Step 2:


Click on the dot and select your GIF (mark the shape) to record.

Step 3:


Now you can start recording your GIF. After the time which has been chosen by you, you can stop recording by clicking the dot on the top of the screen.

or by clicking on the Quick Time Player icon and press Stop Screen Recording.

And Final Step 4:


Save your new Quick Time Player file and then drag it to iMovie. Below you can find also my video tutorial. Hope you’ll find it helpful. Enjoy! 

Read also:

How to create a GIF in Adobe Premiere Pro?

How to make text follow a path in After Effects?

Video Tutorials

Categories
Photoshop

How to create Bubbles in Photoshop?

How to create Bubbles in Photoshop? That’s easy! Follow the tutorial below and learn how to create your own bubble brush. Let’s get it started!

fish and bubbles
Do you like this GIF? Check more GIFS in the store.

Follow the steps below, and watch the video tutorial.

Note: In this video, like in the tutorial on my web page I worked in Photoshop CS6 (this is my first video tutorial, so please bear with me).

Step 1: Create a new document.


Create a new document (the width 600px and the height 600px) with the background content- white.

Photoshop Bubbles

Step 2: Draw the shape of the bubble.


Select the Elliptical Marquee Tool. Drag a selection on the panel, which will become our basic shape of the bubble.

Tip: Holding the shift key makes the perfectly round shape of the bubble.

bubble brush photoshop

Step 3: Create a new layer.


In the Layer menu on the top of the screen choose New, and then choose Layer Via Copy.

bubble photoshop

On the layers panel, click on our new layer by the right mouse button and choose Blending Options.

bubbles photoshop

Step 4: Inner Glow.


The layers styles appeared. In the layers styles dialog box select the Inner Glow option and change the Blend Mode to Multiply. Click on the color swatch below and change the color to black from the color picker. Set the element size to around 40px.

bubbles adobe Photoshop

Step 5: Gradient Overlay 


Add Gradient Overlay. Click on the Gradient preview bar and select black to white gradient (3rd in the row). Change the style to Radial and click on the black spot and then drag it to the left top. Click Okay.

bubble brush

Step 6: Select the brush


Set your brash to the soft round (first brush) and the size around 100px. Create a new layer and make a dot. Go to the Filter menu and select Distort, and then Twirl. Set the angle and click Okay. Adjust new shape as you like.

bubbles tutorial
bubbles Photoshop tutorial
bubble brush tutorial

Step 7: Almost ready!


From the Edit menu select Define Brush Preset and give it the name…and Voila! You can use your new bubble brush.

bubble brush photoshop tutorial

Tip: Go to the Window panel and open Brush panel, you can adjust the shape, or position of your bubbles. Change the brush color to white and start creating 🙂

bubbles in photoshop

Enjoy!

Read also:

Photoshop Tutorials

How to add a Rain Effect to the image in Photoshop?