At the end of this lesson-
- 1. You will be able to describe HTML.
- 2. You will be able to describe advantages and disadvantages of using HTML.
- 3. You will be able to explain HTML tag and it’s type.
- 4. You will be able to explain HTML element and HTML attribute.
- 5. You will be able to write the basic html code for creating a web page.
- 6. You will be able to describe necessary tools for creating web page.
Introduction to HTML: HTML, or Hyper Text Markup Language is designed to specify the logical organization of a document, with important hypertext extensions.
–hypertext refers to the fact that Web pages can contain multimedia, provide links for jumping within & without
–markup refers to the fact that it works by augmenting text with special symbols (tags) that identify structure and content type
HTML allows you to mark selections of text as titles or paragraphs, and then leaves the interpretation of these marked elements up to the browser. The detailed rules for HTML (the names of the tags/elements, how they can be used) are defined using another language known as the standard generalized markup language, or SGML. SGML is wickedly difficult, and was designed for massive document collections. Fortunately, HTML is much simpler! However, SGML has useful features that HTML lacks. For this reason, markup language and software experts have developed a new language, called XML (the eXtensible markup language) which has most of the most useful features of HTML and SGML.
History of HTML: HTML 1.0 was originally developed by Tim Berners-Lee while at CERN, and popularized by the Mosaic browser developed at NCSA in 1989. During the course of the 1990s it has blossomed with the explosive growth of the Web and has been extended in a number of ways. The Web depends on Web page authors and vendors sharing the same conventions for HTML.
HTML 2.0 was developed under the aegis of the Internet Engineering Task Force (IETF) to codify common practice in late 1994.
In late 1994, Tim Berners-Lee, who developed the initial version of HTML, started the World Wide Web Consortium (W3C), whose primary purpose was to develop and distribute standards for Web technologies, starting with HTML.
HTML 3.2 (1996) W3C proposed much richer versions.
–Achieving interoperability lowers costs to content providers since they must develop only one version of a document.
–If the effort is not made, there is much greater risk that the Web will devolve into a proprietary world of incompatible formats, ultimately reducing the Web’s commercial potential for all participants.
The HTML 4.0 was published in late 1997 by W3C. The 4.01 version of HTML was approved by W3C in late 1999
HTML 5 can be said for as an extended version of HTML 4.01 which is the latest version, published in the year 2014.
Advantages and disadvantages of HTML:
- 1.First advantage it is widely used.
- 2.Every browser supports HTML language.
- 3.Easy to learn and use.
- 4.It is by default in every windows so you don’t need to purchase extra software.
- 1.It can create only static and plain pages so if we need dynamic pages then HTML is not useful.
- 2.Lots of code for making simple web page.
- 3.Security features are not good in HTML.
- 4.Long code produces some complexity.
HTML tags: HTML tags can be considered as hidden keywords or commands incorporated in HTML which holds the capability to define how your browser will display the content and format of the web page. Most tags of HTML have two sections, an opening, and a closing part, and any text written within that has its effect based on the working of the tag. The most common example is HTML tag has both a opening <html> and a closing tag </html>. The closing of tags is done by a forward slash (/) at the very start of the tag name.
HTML tag which is usually written as <html>…. </html> or <HTML>…. </HTML> is the only tag which is a must for writing HTML pages.
Two types of Tags:
- Container tags: These types of tags having both opening and closing tags are called container tags. e.g. <p>…</p>, <b>…</b> etc.
- Empty tags:Those who only have an opening tag and no closing tag are called empty tags. e.g. <br>, <hr>, <img> etc.
HTML elements: HTML Elements represent semantics, or meaning. For example, The title element represents the title of the document. Most HTML elements are written with a start tag (or opening tag) and an end tag (or closing tag), with the content in between. Elements can also contain attributes that define additional properties of an element.
HTML attributes: You can define an attribute as the characteristics of any HTML tag that needs to be placed within the opening tag. Attributes are case insensitive.
HTML attributes consist of two parts:
- –attribute name
- –attribute value
For an attribute, the name defines the property to be implemented. For example, BODY Tag, <body> carries many attributes such as bgcolor, background using that you can give a specific image or background texture to your page.
There are four essential attributes which you can implement on almost all HTML elements:
Basic html code for creating a web page/HTML Page Structure: There are two sections. One is head section and another is body section.
The HEAD tag is an important tag used to add the header in HTML. It is used to give various additional information about the page along with description and title to your page; which gets displayed in the title bar or acts as an indicator of what information to use or on which page you are currently in.
HTML metadata is data about the HTML document. Metadata is not displayed. Metadata typically define the document title, character set, styles, links, scripts, and other meta information.
The following tags describe metadata: <title>, <style>, <meta>, <link>, <script>, and <base>. This tags are used in head tag.
The BODY tag is used to give the body, i.e., the visible section of the HTML document. All formatting and writing of content are done in the opening <body> and the closing </body> tag. If your HTML code does not have a body tag associated with it, the HTML code will only show the title in the title bar.
It is to be noted that, together these three necessary tags, <html>, <head> and <body> makes up the skeleton of an HTML document and these are the only foundation tags upon which all web pages are created or developed.
Necessary tools for creating web page: To create web page it needs editor and browser. Editor where code is written and browser that runs html code. Some editors e.g. Notepad, Notepad++, Sublime Text etc. Some browsers e.g. Internet Explorer, Google Chrome, Mozilla Firefox, Apple Safari, Opera, Netscape Navigator, Mosaic etc.
Knowledge Based Questions:
- a. What is HTML tag?
- a. What is container tag?
- a. What is empty tag?
- a. What is element?
- a. What is attribute?
Comprehension Based Questions:
- b. Explain the importance of HTML in web page design.
- b. Describe the advantages of using HTML.
- b. HTML is more popular in creating web page- explain.
- b. “HTML is not a case sensitive language” -explain.
- b. Explain tag and attribute with examples.
- b. Explain <b> and <br> tags.
Multiple Choice Questions: