Lesson 2: Understanding the HTML Basics
Meaning of HTML, Elements, Tags & Attributes
First of all, let´s take a look at some terms you should know:
HTML stands for Hyper Text Markup Language. It´s a markup
language that can be interpreted by different softwares like a web browser that reads
and translates the HTML code and displays a webpage to the user according to the commands
given in the HTML code.
An HTML document is structured with elements, which represent different parts of the document. Most elements consist of three parts: an opening tag, some content and a closing tag. To illustrate the different parts of an element, let´s take a look at the element used for text paragraphs - P.
The opening tag contains the element name "P" within angle brackets "<" and ">". Hence, in the example above, "<p>" is the opening tag. Next comes the content (any text you like) and finally the closing tag which is similar to the opening tag but includes one forward slash "/" right before the element name.
So the function of tags is to tell a browser where a given element starts and where it ends and how it should handle the content within this element.
Important to know is that the element names are case-insensitive, which means that it makes no difference whether you use "<p>" or "<P>" inside your HTML code.
Empty Tags (also called "stand-alone tags") are elements which only consist of an opening tag. They don´t have neither content, nor a closing tag. You will get to know an empty tag in the next lesson.
Attributes are parameters used to further define and format the content of an element.
They are included only inside the opening tags, behind the element name, in the following syntax:
You see, the name of the attribute is "align" and its value in the above
example is "center". And you guess what its function is ...
<p>this is a paragraph</p>
Watch the video to learn the very basic structure of an HTML document.
Display Example: This is how it looks like in your browser. ( just a blank page )
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Now it´s time to get active yourself and create your first HTML document. We´re going to use this document in the following lessons to play around with HTML code. Watch the video and follow me through these steps:
In the next lesson I´m going to show you the bare minimum of information that you need to include in the HEAD section of your HTML documents. We´ll keep this very short and simple.
Cheap Website Hosting
Multiple Site Hosting