LEARNING HTML5 and CSS 1. What Is HTML? Ans: HTML Has Been Derived from SGML, Which Stands for Standard General Markup Language
Total Page:16
File Type:pdf, Size:1020Kb
LEARNING HTML5 AND CSS 1. What is HTML? Ans: HTML has been derived from SGML, which stands for standard general markup language. HTML was created to allow those users who were not specialized in using SGML to create web pages. 2. What are tags in HTML? Ans: An HTML tag begin with a ‘less than’ symbol(<) and ends with a ‘greater than’ symbol(>). These symbols are also called angle brackets. Syntax:<html> text </html> Start tag End tag The part --<html>is called the opening tag, while the part--- </html> is called the closing tag. The closing tag is same as the opening tag except that it has forward slash before its name. 3. What is the difference between the <body>and <head>tags? Ans: The HEAD section contains the title and the other information about the HTML document. The BODY section contains all the information that is displayed on a web page. 4. How are attributes defined? Ans: An attribute provides additional information about an element. Attributes are usually defined its name-value pairs. The name is the property of the tag that you want to set, while the value is the value of the property to be set. <p align = “left”>This text is left aligned </p> The <p> tag, also knows as the paragraph tag, is used to define a paragraph. Now we can use the attribute align with it to set the alignment of the paragraph. Also, there are three possible values of the align attribute—left, right, and center. 5.Define HTML. What is its use? Ans: HTML stands for hypertext markup language. It is a programming language that uses markup codes to create web pages. 6. What are HTML tools? Give examples. Ans: There are two tools required for working on an HTML document---an HTML editor and a web browser. HTML editor: HTML editor is an application software program that allows and write HTML codes. There are two types of HTML editors---WYSIWYG editor and text editor. WYSIWYG editor: The term WYSIWYG stands for ‘What You See Is What You Get’. Examples of WYSIWYG editor: Adobe Dreamweaver, Google web Designer, Amaya. Text Editor: A text editor is a plain text editor like Notepad, which required user to have an extensive knowledge of HTML programming. Examples of text editor: Word pad and TextEdit. Web Browser: A web browser is required to view HTML documents. Examples of web browsers: Google chrome, Microsoft Edge, Mozilla Firefox etc. 7. Explain the structure of an HTML document. Ans: An HTML has two main components ---HEAD and BODY. 1. The HEAD section contains the title and the othe information about the HTML document, 2. The BODY section contains all the information that is displayed on a web page. Structure of an HTML program <!DOCTYPE html> element: This element is an empty element. It specifies that the following document is an HTML document. <html>element: This is a container element. It contains the complete HTML document. The <head> and <body> tags are enclosed within the <html>tag. <title> element: This is a container element that contains the title of a web page. This title is displayed on the title bar of the browser window. 8.How to create an HTML document? Ans : To create an HTML document: • Click start button>Windows Accessories>Notepad • The Notepad window appear on the screen. • Type a simple HTML code. • Click on the File menu and selects the Save option. The save As dialogue box opens up choose the desired location to save the document. • Types in a desired name for the file with an extension ‘.html’ and clicks on the Save button. .