With the knowledge of HTML, you can create websites. HTML stands for Hyper Text Markup Language. A markup language is a set of markup tags that describe document content. HTML documents contain HTML tags and plain text. HTML documents are also called web pages.
HTML tags are keywords (tag names) surrounded by angle brackets like <html>. Normally, tags come in pairs - start tag and end tag. The end tag is written like the start tag, with a forward slash (/) before the tag name. Start and end tags are also called opening tags and closing tags.
A pair of tags and the content these include are known as an element.
Attributes are used to say something about the element that carries them. They always appear on the opening tag of the element that carries them. All attributes are made up of two parts - name and value.
The name is the property of the element that you want to set. The value is what you want the value of the property to be.
You don't need any special programs to write web pages. You can simply use a text editor such as Notepad on Windows or TextEdit on a Mac, and save your files with the .html file extension.
1. The html Element
Whenever you write a web page in HTML, the whole of the page is contained between the opening <html> and closing </html> tags.
The lang attribute with a value of en, specifies that the document is in English. This attribute is optional.
Inside the <html> element, there are two main parts:
Together, the <html>, <head>, and <body> elements make up the skeleton of an HTML document - they are the foundation upon which every web page is built.
2. The head Element
The first line inside the head is the one that defines the character encoding for the document. HTML5 improves on this by reducing the character encoding <meta> tag to the bare minimum:
In nearly all cases, utf-8 is the value you will be using in your documents.