The first step in learning any new language is to learn the basics. HTML (Hyper Text Markup Language) is actually a very simple and easy to learn language.
HTML is made up of tags. There are two kinds of tags; opening and closing tags. Opening tags are pieces of text contained in “<>” and looks like the following: <tag>.On the other hand the closing tags have a structure like the following with a </tag>.
The whole structure of the tags are like the following:
The information put in between the opening and the closing tags are applied the functionality of the tag.
The use of the <body> tag for the body of the web page
Your web page body text will be placed here
Structure of HTML Page
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
<html xmlns=”http://www.w3.org/1999/xhtml” >
<title>Titled for the page</title>
This tag is the first thing in a HTML document. This is not a HTML tag exactly, but it tells the web browser what version of the markup language the web page is written in.
Doctype also refers to a Document Type Definition (DTD). Document Type Definition (DTD) specifies the rules for the markup language to make sure that the content is rendered properly by the browser.
<html xmlns></html> tag
The <html> tag indicates the browser that this is the beginning of a HTML document, and the </html> tag indicates the browser that this is the end of the HTML document.
The xmlns attribute within the starting <html xmlns> tag specifies the xml namespace for a document. This attribute is compulsory in XHTML but is invalid in HTML. However the HTML validator at w3.org does not mind if this attribute is missing in the XHTML document. The reason is because the attribute is added to the tag automatically and set to the following by default. “xmlns=http://www.w3.org/1999/xhtml”
This tag contains the head elements of the web page. The head elements within the tags can include configuration options like scripts, instruction to the browser to find and load Style Sheets, meta information, etc. Some of these tags include:
The HTML <base> tag is used to specify a base URI, or URL, for relative links.
For example, you can set the base URL once at the top of your page in header section, then all subsequent relative links will use that URL as a starting point.
The HTML Link Element (<link>) specifies relationships between the current document and an external resource. This Element is most used to link to style sheets.
Metadata is data (information) about data.
The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page.
Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.
The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.
The <script> element either contains scripting statements, or it points to an external script file through the src attribute.
The <style> tag is used to define style information for an HTML document.
Inside the <style> element you specify how HTML elements should render in a browser.
Each HTML document can contain multiple <style> tags.
This tag defines the title of the HTML document. The <title></title> tag is required in all HTML/XHTML documents. This element defines a title to the browser toolbar, provide a title for a web page when it is added to the favorites and displays a title for the page in search-engine results.
This tag defines the body of the web page. The <body></body> tag contains all the contents of a HTML web page like text, hyperlinks, images, tables, lists, etc. This is the most important tag of the web/HTML document.