Introduction to HTML
The Internet or the World Wide Web has become an integral part of every person's life. It is a network of interconnected computers. The World Wide Web (WWW) contains information stored on the Internet in the form of web pages that combine to form a website. But for creating and maintaining those websites, a powerful yet simple language is needed. HTML, abbreviated as HyperText Mark-up Language, fulfills this role.
History of HTML
HTML was founded by Tim Berners-Lee. When the Internet boomed in the 1990s, so did the usage of HTML. HTML was originally known as General Mark-up Language. This concept was standardized and named SGML(Standardized General Mark-up Language) in 1986. SGML is favored by large organizations that need to handle large amounts of data. New versions of HTML were introduced, with the latest being HTML 5.
HTML Basic Tags and their Attributes
An HTML document is made up of two parts: content and tags. The content is the text which is actually going to be displayed in the browser. While the tags are special text which is meant to define how the text should appear. At the start and end of the document also tags are put.
HTML Document Structure
The structure of HTML documents is like the following.
HTML Document Structure
Types of Elements
Container Elements
Heading Tags
To define heading levels in an HTML document, the Heading tag is used. It is mostly used to place emphasis on the text. H1 to H6 are the six heading levels in HTML. The Heading style displays the text in the largest possible size of HTML. It is mainly used for the main headings of the document. The lower levels like 1,2 and 3 are used for the main headings.
Heading Tags
Paragraph Tag
The paragraph element is used to display a large piece of text on a web browser. It is used to mark a paragraph as a block of text. To mark the end of a paragraph, this element is used. The attributes named "Align" can be used to align a paragraph. Various attributes of the paragraph element have been demonstrated below:
Paragraph Tag
Line Break Tag
HTML's line break tag <br> element is used to produce a line break in the text. It is of significant importance when writing a poem or an address as the division of lines is really important. It does not possess any end tags. Line break tags can be placed anywhere within the body tags of the text. Line break tag <br> can be used inside even table cells and in other areas also.
Line Break Tag
Horizontal Tag
For creating a horizontal line, the HTML <hr> tag is used. It is called the Horizontal Rule in HTML. It is used to separate two blocks of text. You can simply type <HR> wherever you want to insert a horizontal line in between the document. In the <HR> tag, type size = " whatever thickness you want to apply." The size attributes of <HR> are values that are measured in terms of pixels. Pixel is equal to the part obtained by division of an inch into 72 points.
Horizontal Tag
Practice Questions
1. Choose the correct html tag for a large title from the following.
<H1>
<H3>
<H6>
None of the above
2. What is the latest version of HTML?
HTML 1
HTML 3
HTML 5
None of the above
3. A pixel is _th part of an inch.
36
50
72
None of the above
Sample Questions and Answers
1. HTML elements are represented and enclosed by?
Ans: HTML elements are represented and enclosed by angle brackets, i.e. < and >.
2. Which element is used to produce a line break in the text?
Ans: The <br> tag element is used to produce a line break in the text.
Summary
For creating and maintaining those websites, a powerful yet simple language is needed. HTML, abbreviated as HyperText Mark-up Language, fulfills this role. In this article, you were introduced to HTML and its history. You also learned HTML basic tags, their attributes, HTML document structure, and types of elements.
FAQs on Working with HTML
1. What is HTML?
HTML, abbreviated as HyperText Mark-up Language, is a powerful yet simple language.
2. What is HTML used for?
HTML, abbreviated as HyperText Mark-up Language, is used for creating and maintaining those websites.
3. What are the various types of tags in HTML?
There are various types of tags in HTML like Heading Tags, Paragraph Tag, Line Break Tag and Horizontal Tag.
4. What is the meaning of a tag in HTML?
Tags are special text which is meant to define how the text should appear.