Introduction to HTML
Introduction
HTML (Hypertext Markup Language) is the foundation of a website. While you may see file extensions like php, cfm, asp, etc., these files will still contain HTML tags in order to display content. An HTML file is placed on a server and when requested by a user, it is read into the user’s browser and displayed as a web page.
The standards and practices for writing HTML are set by the World Wide Web Consortium (W3C) and there are multiple versions of HTML. Since this is more of an introduction to HTML, we will not go into detail about the various versions like XHTML, HTML 4.01, and HTML 2.0. We also won’t go into classifications of standards like strict, traditional, and frameset.
HTML is a very easy language to learn and super simple to write (not that I would necessarily call HTML a language so to speak). A Markup Language is defined as transporting data, not acting upon the data itself. The “code” is encapsulated in a skeleton like the example below.
Code Example
<html>
<head>
<title>Example</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
HTML Skeleton
As you can see, the language uses words contained inside, known as tags or elements. You also might notice that every tag is almost duplicated, but the second tag has a / before it. These are referred to as opening and closing tags and are required by most HTML elements. The important tags here are <html>, <head>, <body>. The <html> simply tells the browser, “Hey, this is html code.” While the <head> tells the browser specific things about the document, it does not display anything on the web page. Finally, anything inside of the <body></body> tags will display in the web page. We will go into more detail about the <head> and <body> later.