html

HTML Syntax mines structure of HTML that mines how to write HTML code on our computer. Now I will discuss the structure of HTML. Try to understand each line. If any line If you have difficulty understanding, let me know. Remember, if you don't understand this part, you won't understand the rest. So try to understand with mindfulness.

First we will look at the structure of HTML5,

<!DOCTYPE HTML>

<html>

<head>

            <meta charset=”UTF-8”>

            <title></title>

</head>

<body>

 

</body>

</html>

Above we wrote the structure of HTML. This is the structure of the latest version of HTML5 . Now we will look at an example and discuss the example in detail. First to get started with HTML Enter the following code into NotePad:

<!DOCTYPE HTML>

<html>

<head>

            <meta charset=”UTF-8”>

            <title> This is Title</title>

</head>

<body>

            Hello World!

</body>

</html>

I understand you may not understand anything right now.  No problem.  I now every line.  Let me explain to you.

 1.  Writing the first line indicates to the browser that it is an HTML document.  We are HTML5 .So we're using<!DOCTYPE HTML> .  If we were to use HTML 4.01

 Then write like below;

<!DOCTYPE HTML PUBLIC  “_//W3C//DTD  HTML  4.01 Transitional//EN”  “http://www.w3.org/TR/html14/loose.dtd”>

However, since we are using HTML 5, we just type <!DOCTYPE HTML>. All You need to use this dock type at the beginning of HTML. Many people do not pay attention to HTML DOCTYPE. But,If you want to be professional, never avoid this issue. Because, if you do not use docktype, some browsers are fine the output does not come. So, use doctype at the beginning of every HTML file.

 

2. Before explaining the second line, let me discuss HTML tags with you. Above The written html, head, title, body are each called tags. Take a look and start with the tag Less Than Is and ends with the Greater Than sign. So, <html>, <head>, <title>, <body> are written.


 Almost each tag has a beginning and an end. So, when the <html> tag starts, the tag </html> ends like this done. To end the tag, a Forward Slash (/) sign is given after the Less Than sign. Tags directly Does not display in browser. So after opening the index.html file, no tags are displayed in the browser. Just. Elements are displayed while browsing. The text that is in the middle of the HTML tag is the element.


3. The second line is the tag. All HTML code is written between <html> tags. <html> in the tenth line .Its tag has been removed. The <html> tag has two sections, one being the <head> section and the other being<body> section


4. The third line is a tag that ends in the sixth line. Similarly, <body> is a tag that follows done.


5. We used a tag called meta in the fourth line. Inside the meta tag is written charset. To titles called attribute. You will get more ideas about attributes later. Notice that meta is a single tags .Because, this tag has started but this tag has not ended. All the writing of a website in any format.The charset attribute is used to indicate that there will be.


6.  Hello world on the eighth line! Wrote and it is displayed in the browser. This is the HTML element. There is an element between the start tag and the end tag and the element is displayed in the browser. But, tag not displayed directly in the browser.


Finally, you saved the file as index.html. Here, instead of writing index, you can text anywhere can write. It is your wish. However, the .html extension must be maintained. HTML after the file name must have. Many people mistakenly save it with txt instead of html and open it in the browser. 

1 Comments

Post a Comment

Previous Post Next Post