15/8/2019

Lesson 2

USE PHOTO

<img>

"img" tag meanse "image". Recent blog, news ,article and so on required some picture & photo.

EXAMPLE

<img src="/ File Path / File Name" >

"File Path" is where its file is.

If the file is in "hara" directory, we write "/hara/hara.jpg"

Relative File Paths

Let's try displaying a Dr.Fatton !

<img src="/fatton.jpg" >

PathDescription
<img src="fatton.jpg"> fatton.jpg is located in the same folder as the current page
<img src="images/fatton.jpg"> fatton.jpg is located in the images folder in the current folder
<img src="/images/fatton.jpg"> fatton.jpg is located in the images folder at the root of the current web
<img src="../fatton.jpg"> fatton.jpg is located in the folder one level up from the current folder

Absolute File Paths

An absolute file path is the full URL to an internet file.

<img src="https://upcomingnewmovieslist.com/fatton.jpg" >

img="/"(※Relative File Paths) is same as img="https://upcomingnewmovieslist.com/"

Which path is good ?

Currently, both are said no difference in both to seo effect. In other word, please choose the one you like.

I always write Relative File Paths because it is fewer text.
But, in Wordpress, default function sometimes require Absolute File Paths.

https://www.w3schools.com/html/html_filepaths.asp

alt Attribute

Google Image Search check alt Attribute in <img> tag.

It is said google bot or crawler cann't understand the photo what or who where...

alt Attribute help to tell about photo or picture. So setting alt Attribute is most important for SEO.

EXAMPLE

<img src="/fatton.jpg" alt="Dr.fatton" >

Dr.fatton

If file had lost or file path was wrong, alt Attribute are displayed text.

EXAMPLE

<img src="/hara/fatton.jpg" alt="Dr.fatton" >

Dr.fatton

Let's Try

Let's displays Dr.fatton on your directory.

Be careful File Path !