html viva

Upload: pavan-koundinya

Post on 05-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 HTML Viva

    1/2

    Ques.1>What is HTML? What is a Hypertext link?Ans.> HTML, or Hyper Text Markup Language, is a Universal language which allows an individual special code to createweb pages to be viewed on the Internet.Any HTML page begins with , , and ends with , and tags.A hypertext link is a special tag that links one page to another page or resource. If we click the link, the browser jumps tothe link's destination.Ques.2> What is a tag? How can we use MARQUEE in HTML?Ans.> In HTML, a tag tells the browser what to do. When we create a HTML page, we enter tags in order to change theappearance of text, to show a graphic, or to make a link to another page.

    The marquee tag is a non-standard HTML markup element type which causes text to scroll up, down, left or right.text...Ques.3> What is a DOCTYPE?Ans.> The doctype declaration refers to a Document Type Definition (DTD) which specifies the rules for the markuplanguage, so that the browsers can render the content correctly. According to HTML standards, each HTML documentbegins with a DOCTYPE declaration that specifies which version of HTML the document is using. Originally, theDOCTYPE declaration was only used by SGML-based tools like HTML valuators, which needed to determine whichversion of HTML, a document used.Ques.4> How do we create a link? What are the three types of form tags in HTML?Ans.> We use an anchor element to create a link. The HREF attribute specifies the URL of the document that we want tolink to. The following example links the text "Web Authoring FAQ" to :Web Authoring FAQA tag has three attributes:a. Method b.Action c. Ectype.Ques.5> How do we specify page breaks in HTML?Ans.> There is no way in HTML to specify where page breaks will occur when printing a page. HTML was designed to bea device-independent structural definition language, and page breaks depend on things like the fonts and paper size thatthe person viewing the page is using.Ques.6> How do we use an image instead of the standard submit button?Ans.>We use instead of the normal submit tag. Butthere is no way to do this for the reset button.Ques.7> What are meta tags and why it is used?Ans.> The tag provides metadata about the HTML document. Metadata will not be displayed on the page butwill be machine parsable and are typically used to specify page description keywords last modified and other metadata.The tag always goes inside the head element. They can be used by browsers, search engines or other webservices.Ques.8> What is Semantic HTML? What are the reasons for validating a HTML?Ans.> Semantic HTML means using HTML tags for their implied meaning rather than using (meaninglessly). div andspan tags are absolutely for everything. Depending on the tag the content in the tag can be interpreted in a certain way.To ensure one shared HTML coding standard in the World Wide Web, smooth speed ability of the HTML page andbetter positioning of the HTML in Search Engines.Ques.9> What is BODY in HTML document?Ans.> The effects which we want in the window are mentioned with the help of tags in the body. It is the place where theactual data is written in html. All the changes can be viewed by changing the tags content in the body whereas the headpart is the introduction part and the body is the actual content part.data contentQues.10> What is SPAN in HTML?

    Ans.> The SPAN having notation as: is used for highlighting text of any color desired for addingcolored text for adding background image to text. SPAN does not cause a line break. It delimits text and it allows stylesto be applied to an 'elemental' region or for the 'elemental' region to be identified without causing a break in the textflow.Ques.11>What are differences between DIV and SPAN?Ans.>Generally we use table and div tag for the layout. If we use table tag the site takes lot of time to load but if we useDIV tag it is quick & advance, especially in search engine. It has attributes position and all other feature like table tag.Whereas SPAN is a like sub tag, which apply styles for the specified content in-between the SPAN tag. We can also use itfor highlighting some text to fix extra space for any other text or content like those.Ques.12> What are the differences between cell spacing and cell padding?Ans.>Cell spacing and Cell padding are used for formatting but there is a major difference between cell padding and cellspacing. It is as follows: Cell padding is used to set extra space which is used to separate cell walls from their contents

    whereas cell spacing is used to set space between cells.The general format of specifying cell spacing cell padding are as follows:< table width="100" border="2" cellspacing="20">< table width="100" border="2" cellpadding="5">One can also apply cell spacing and cell padding together. It is done as follows:< table width="100" border="2" cellpadding="5" cellspacing =20>

  • 8/2/2019 HTML Viva

    2/2

    Ques.13>How do we make a picture as a background on my web pages? Ans.>We point the body background to the name of our image we wish to use as the background as shown below. Thisbody line should be the first line after tag. We can also have the background image fixed, so it does not movewhen using the scroll bar in the browser. To do this we add the BGPROPERTIES tag as shown below.Ques.14>What are the various text formatting tag in HTML?Ans.>defines bold text;
    inserts a single line break; defines centered text;defines emphasizedtext;defines a horizontal rule;defines italic text;

    defines a paragraph;defines underlined text.

    What is a Hypertext link?A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumpsto the links destination.

    1. Whats relationship between JavaScript and ECMAScript? - ECMAScript is yet another name for JavaScript(other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.

    2. What are JavaScript types? - Number, String, Boolean, Function, Object, Null, Undefined.3. How do you convert numbers between different bases in JavaScript? - Use the parseInt() function, that takes a

    string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt

    ("3F", 16);

    4. What does isNaN function do? - Return true if the argument is not a number.5. What is negative infinity? - Its a number in JavaScript, derived by dividing negative number by zero. 6. What boolean operators does JavaScript support? - &&, || and !7. What does "1"+2+4 evaluate to? - Since 1 is a string, everything is a string, so the result is 124.8. How about 2+5+"8"? - Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, its concatenation, so 78

    is the result.

    9. What looping structures are there in JavaScript? - for, while, do-while loops, but no foreach.10. How do you create a new object in JavaScript? - var obj = new Object(); or var obj = {};11. How do you assign object properties? - obj["age"] = 17 or obj.age = 17.12. Whats a way to append a value to an array? - arr[arr.length] = value;13. What is this keyword? - It refers to the current object.