italia2all / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Declaring Document Language #1

Open jordanwillis opened 6 years ago

jordanwillis commented 6 years ago

Great job considering that you should include a language declaration for your HTML document! This is a very important attribute for lots of reasons (e.g. browser character rendering, search engine optimization, accessibility, etc.) but often easy to forget.

With that said, the correct way to declare the language is actually as an attribute on the opening HTML tag like this.

<!DOCTYPE html>
<html lang="en" dir="ltr">

It is possible to include the language as a meta element within the <head> section, but it is considered bad practice, so I would recommend not doing this. Just for learning sake, the way you correctly do it is like this.

<head>
  <meta http-equiv="content-language" content="en">
</head>

Instead of like this...

https://github.com/italia2all/prj-rev-bwfs-dasmoto/blob/c5f92a98b7507fc288290ffefb2f7174cca50040/dasmoto/main.html#L4

Here is more information about the 2 approaches in case you are interested in learning more.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language

italia2all commented 6 years ago

I thank you so much for correction and apprication. It built my confidence and try to do better in next time.