Sunday, April 20, 2014

What is HTML?

So there's this thing called HTML, aka Hyper Text Markup Language. This language is just a long set of what are called markup tags, which describe the content of the document you're making. These HTML documents contain HTML tags, as well as regular text, and are also known as web pages. Lots of new words, huh? You might want to get used to that.

Now that you know what an HTML document is, you probably want to know how to actually view one. That's what web browsers are for (i.e. Chrome, Safari, Internet Explorer). When you use a web browser to read an HTML document, it displays the document as a web page without the tags. Here's an example to help explain the difference between the code itself, and a web page display:


This is what your code looks like.
After opening your file as a web page, the tags disappear.

Side note-I'll go into detail about specific tags in another post, but to avoid some confusion, the <!DOCTYPE html> tag in the example above is actually a declaration that defines what type of document is being used, so the browser can correctly display the web page. In this case, <!DOCTYPE html> is the doctype for HTML5.

When coming up with simple code, using the Notepad program is perfect (find it in the Accessories folder of your programs). Just type your code into it, and when you save, edit the file name to end with .html. Now you can find that file, and it will open up as a web page into whatever your default web browser is. Simple enough, right? Now we can start learning about putting actual content into your code.










No comments:

Post a Comment

 

Template by BloggerCandy.com