Lesson 6.

13 0 0
                                        

How do you make your first HTML file?

In the previous lesson you learned how to create an HTML file. Write this:

  --------------------------------  

<!DOCTYPE html>

<html>

<head>

<title>TODO supply a title</title>

<meta>

<meta>

</head>

<body>

<p>TODO write content</p>

</body>

</html>

--------------------------------

In the editor. Just without the -- things.

What is in between the < and the > is named a "tag".

Every time you use the <....> you will need to close the code too. That is why </....> that exists.

  <!DOCTYPE html> This will let the browser know that it is working with an HTML file. You declare the document type this way. To open the document to "writing" you will need to open the file to be able to write HTML codes. You write <html> for that. Of course you will need to end the whole file, everything you put between this code is HTML code, until you declared it different.  To close this document, write </html>. 

The <head> "tag" (see below the code.) is what the browser sees but does not output in for the user to see. It kind of "declares" how to handle the code that it gets. Again, you will need to open and close this. 

The <head> and <body> tags are different from each other. The <body> tag is the information that the user and browser is able to see. The <head> is for the browser to see, but not for the user.

The <title> tag is used for a title, seems logical right? 

Here you see the <title> tag:

This will need to be closed in the code as well

Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.

This will need to be closed in the code as well.

  <meta> 

This simply says that the type of language is  "UTF-8".

(More information is here: https://en.wikipedia.org/wiki/UTF-8 )

Upon closing the <head> you will now need to start the code that the user will see. You will do this by opening the <body> of the file. Here you can write the code of the things that you might use, as for the user to see. The <p> tag is used as a "paragraph" or just an option to let it show in the browser. In the Lesson about Xampp I will be showing you how this looks. For now there is a simple picture how it might look:

 For now there is a simple picture how it might look:

Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.

You can see the <title> in the tab. "Just a title." I am using FireFox Developer here. 

The TODO write content is what I wrote between the <p> tags.

Here is the editor part of Netbeans IDE.

Here is the editor part of Netbeans IDE

Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.
You've reached the end of published parts.

⏰ Last updated: Dec 08, 2017 ⏰

Add this story to your Library to get notified about new parts!

Programming.Where stories live. Discover now