Notes related to Computer Applications Class X (10th Subject code 165) related to unit 2 (HTML Basic Elements, Images, Links and Tables, Audio, video and Forms, CSS) in the form of questions and Answers. (20 marks)
Introduction to HTML Basic Elements
What is HTML?
HTML stands for Hyper Text Markup Language. It is a standard markup language for creating webpages. It has following features:
- HTML is a Web Page Layout Language or you can say it defines the structure of the Web Page.
- HTML is a Hyperlink Specification Language. (This makes webpage interactive through these hyperlinks)
- HTML is made up of different elements that describe or tell the browser how to display the Web Page contents.
- These elements are known as tags and attributes.
HTML – In a Question / Answers format
Who introduced HTML?
HTML was introduced by Tim Berners-Lee in 1991 at CERN as a simple markup language but since then it has evolved through different versions. Current version of HTML is 5.
What are HTML tags?
HTML tags are kind of commands or instructions given to browser. Browsers use these commands to format and structure the contents of a webpage in a desired way.
List basic tags of HTML?
Basic Tags of HTML are:
- <HTML> </HTML> marks the beginning and end of the document
- <HEAD> </HEAD>contains all the elements that describe the HTML document.
- <TITLE> </TITLE> describes the title of the webpage. This title gets displayed on the browser’s title bar.
- <BODY> </BODY> all the webpage content goes here.
- Heading Tags defines 6 levels of heading – from highest to lowest (H1,H2,H3,H4,H5,H6). These are container tags having opening and closing tags from <H1></H1> to <H6></H6>.
- <P></P> Paragraph tag
Explanation
HTML tags instruct the browsers telling browser how to format and display text, images and links on a webpage. Tags are more than 100 html tags in the current version of HTML.
Mostly all the HTML tags (but not all) are made of two parts – opening tags and closing tags.
Creating and Saving an HTML document
You can create and HTML document using any text editor like Notepad for example. There are some advanced editors are also available with additional features, for example Sublime Text, VS Code etc.
Write HTML Code using editor of choice:
After Opening the Editor, type the HTML code example shown below:
<!DOCTYPE html> <html> <head> <title>This is My First Web Page</title> </head> <body> <h1>Hello and Welcome to my First Web Page</h1> <p>This is Paragraph. Here you can write some text that you want to display in the paragraph format </p> </body> </html>
Output:
HTML – In a Question / Answers format
Explain with example Opening and closing tags in HTML?
Opening and Closing tags mark the beginning and closing of block. For example <HTML> is an opening tag and </HTML> is a closing tag which marks the beginning and end of the entire HTML page.
Another example <P> is an opening tag for paragraph and </P> marks the end of paragraph.
What are HTML attributes?
HTML attributes provide additional information about HTML tags.
- These are special words that can be used to control the behavior of HTML tags or elements.
- Attributes associated with a particular are placed inside the opening tag of that tag.
- For example:
- <Table border=”2″> here <table> is a tag and border is an attribute
How <BR> tag is different from <P> tag?
<BR> inserts a line break or starts a new line within the paragraph, on the other hand <P> tag is a paragraph tag that starts a new paragraph.
What is BASEFONT tag and what it is used for?
The <BASEFONT> tag is used to define the default font size and type for a web document. The BASEFONT size can be altered (increased/decreased) using <font> tag.
Write the HTML code to display the Horizontal line of some color.
<HR color=’Green’>
- Above code can be used to display Horizontal line of GREEN color.
- In the above code <HR> is a tag and COLOR is an attribute.
Which Heading element produces the most distinguished or notable heading?
<H1> tag produces the most prominent heading hence should be used for top level heading in the document.