Skip to content

The Beinning of Time

Midori Koçak edited this page Apr 30, 2017 · 3 revisions

The beginning of time.

Every website project that starts from scratch starts from here. At the beginning of time, we have these files:

  • index.html
  • css/style.css (Styles file are still empty but we will keep css files here)
  • js/main.js (We will keep our js files here. )
  • img/me.img (Doesn't matter what image you have, but we keep images here.)

Basic structure of an empty HTML file

Let's start with index.html file structure:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>

Every HTML5 file starts with this tag, this tag defines our webpage's version wich is HTML5:

<!DOCTYPE html>

But what is a tag? A tag is a structure for us to mark a piece of information. All tags are wrapped between "<" and ">" characters. Two tags can wrap some piece of information, with same tag having "/" character at beginning. HTML files are consisted of tags. For example, to define the title of my page I use title tag.

<title>Title</title>

HTML tags can have different attributes too. For example in our code html tag, has attribute called lang, and it's value is en. Using this attribute we define our page's language.

<html lang="en">

A proper HTML page, after the Doctype element starts and ends with tags.

Head

The information between head tags are not shown on the website. Like meta tags, we define meta information (information about information we present on our website) here. We are encouraged to include css files, font files and maybe js files here.

Body

Body is the essential tag that defines what is going to be in our web page. We will add images, articles, links, navigation bars inside the body.

Clone this wiki locally