Top Interview Questions and Answers

Top Interview Questions and Answers
Interview Sortout

Browsing "Older Posts"

Browsing Category "HTML"

HTML Interview Questions and Answers for Freshers

By Dhananjay → January 20, 2018
HTML stands for Hyper Text Markup Language. We can not say that HTML is a programming language but a markup language. HTML uses markup tags and they are designed to perform some particular task. For Example, Paragraph tag p is used to include any paragraph in a web page, Anchor tag a is used to add a hyperlink in a page.
HTML is not only limited to design but also it has advanced and can be used to develop device compatible applications fro smart Television, Digital Advertisement Display etc.Whatever can be the server side language say JSP, ASP or PHP, Python or Ruby HTML will be the display part. When we are talking about a web page we are talking about an HTML page. Basically, it is part of Web Design and case insensitive. We can have following questions that can be asked in interviews:

What is HTML?
HTML is a markup language and used to design a web page using marking tags.

How can we create an HTML page?
We can create a plain text file and .htm or .html as an extension, it will be converted to the HTML page.

What is the basic structure of HTML page?
HTML page is devided in to three segments
(1) Document Type markup  that is  html
(2) Head and Title portion that is head and title
(3) Main Content or body portion



What types of input tag are used nowadays?
There are many input tags introduced since HTML5. Some of the most used and popular input types are as below:
(1)text: this is used for alphabetical characters to input in the form.
(2)tel: this is used to input the telephone numbers
(3)date: date is used to input date.
(4)email: email is used to input date
(5)number: a number is used to input a number, negative, positive or zero
(6)textarea: Long text can be input using text area. For example, we can use to input the message in a contact form.
(7)Select type(combo): when we have to select from some options it may be multiple type selection.

    How many methods are there for a form?
    There are two methods for a form: get and post.

    What is  br tag? 
    It is called Break Line tag. When we have to break line in the paragraph we use Break Line tag.

    What is meta tag?
    Meta tag is a part of head section of a HTML page. It includes page information, content type information and device compatibility information. Meta tag helps page to be indexed in search engine directories.

    How we can include a style sheet in an HTML page?
    We can include a seperate style sheet using link tag inside head section.
     <link rel="stylesheet" type="text/css" href="style.css" />  

    What is arrtibutes of Tag?
    Every tag has some advanced and customize features that developer can enhace. These features are known as arrtibutes. For example "bgcolor" is backgroud color , "font-style","width","height","align" etc. How the content will display it depends on the value given to different properties of tags.

    What is table tag?
    table tag is used to create a tabular structure to represent some statistical data in a web page. Table has number of rows and number of columns in each rows.

    What are the arrtibutes of table tag?
    Arrtibutes of table tag are as below:
    1- Border
    2- Width
    3- Height
    4- Align
    5- Bgcolor etc.

    What is the use of anchor tag?
    Anchoe tag is used to create a hyperlink is a webpage. We can connect to pages on the site or any third pary link to our website. For exampe:
     <a href="">Facebook</a>  

    List some attributes of anchor tag?
    Attributes of anchor tag are as below:
    (1)Href : What will be hyper link?
    (2)target : where to open the link?
    (3)title : what will be the title of tag, it will apear when mouse goes over link.

    What is a div tag?
    Div tag create a rectangular area in a web page. Further we can manipulate it using attributes and style. div tag is used to create layout of webpage.

    What is form?
    FORM tag is used to create a user form in web page to store user inputs. Input tags are used to collect the input values from user and form action hadle the request.

    How to write a form tag in a web page?
    We can include a form tag as given below:
     <form method="post" action="form-action.php">  
     <!---input elements--->

    What is marquee tag?
    marquee tag is used to insert a moving element in the HTML page. For example, Notices are moving from left to right or top -bottom direction in an informational website.

    Create a table having table head and foot?
    We can create a table as given below:


    How Many types are lists?
    There are three types of lists in HTML basically, as given below:
    1- Unordered List  implemet by ul tag
    2- Ordered list implement by ol tag
    3- Data list implement by dl tag

    What are the headings tag? What is the usage of Headings in HTML page?
    HTML provides heading tags to implement document heading in the page. There are 6 headings H1, H2......H6.H1 has the biggest font size by default so we can use it as the main heading and other can be used as subheadings.

    How can we include Javascript in HTML page?
    We can include javascript code inside html page using  script tag. We can directly write code of javascript in pgae or we can use a seperate javascript page.

    What is a responsive web page?
    A responsive webpage is dynamic view page that is compatible to different types of display and orientation. To make a page responsive we use media query and view port acces to control orientaion and layout.