Sunday, 31 March 2019

40 - HTML multiple choice questions

1. HTML stands for?
A. Hello text markup language
B. Hyper text markup language
C. High text markup language
D. None of these

-------------------------------------------------------------------------

2. HTML language is a set of markup
A. Tags
B. Sets
C. Attributes
D. Groups

-------------------------------------------------------------------------

3. HTML file extension?
A. .hml
B. .html
C. htnl
D. .hnl

-------------------------------------------------------------------------

4. HTML is considered as?
A. Markup language
B. Programming language
C. OOPS language
D. Middle level language

-------------------------------------------------------------------------
5. Which tag is used to display pictures in HTML?

A. image
B. Picture
C. img
D. video

-------------------------------------------------------------------------

6. HTML tags are case sensitive?
A. true
B. false

-------------------------------------------------------------------------

7. Which tag is used for scrolling text?
A. <marquee>
B. <p>
C. <div>
D. <mg>

-------------------------------------------------------------------------

8. Which tag is used to make the text as italic?
A. <b>
B <br>
C. <i>
D. <h1>

-------------------------------------------------------------------------

9. Which tag is used to make the text as bold?
A. <b>
B. <i>
C. <br>
D. <span>

-------------------------------------------------------------------------
10. Which element is used for the largest heading?

A. <h6>
B. <h1>
C. <head>
D. <heading>

-------------------------------------------------------------------------

11. HTML is a subset of
A. SGML
B. SGBML
C. Both
D. None of the above

-------------------------------------------------------------------------

12. Which element is used for line break?
A. <break>
B.  <b>
C.  <br>
D.  <linebreak>

-------------------------------------------------------------------------

13. Which is the correct sequence of HTML tags for the web page to be started?
A. head, title, html
B. title, body, html
C. body, html, head
D. html, head title

-------------------------------------------------------------------------

14. Which tag is used to add links to your page?
A. <a>
B. <b>
C. <br>
D. <img>

-------------------------------------------------------------------------

15. Which tag is used to make the text italic?
A. <text>
B. <i>
C. <italic>
D. <italictext>

-------------------------------------------------------------------------
16. Which is the root tag of the HTML document?

A. body
B. html
C. head
D. title

-------------------------------------------------------------------------
17. Which tag is not found in the head tag?

A. <table>
B. <title>
C. <style>
D. all of the above

-------------------------------------------------------------------------
18. What is the meaning of vlink?

A. active link
B. visited link
C. visible link
D. All of the above

-------------------------------------------------------------------------

19. Which tag is used to define inline styles?
A. style
B. styles
C. class
D. font

-------------------------------------------------------------------------
20. What is the use of inline styles?

A. To apply css to all HTML pages
B. To apply unique style to single page
C. Both of the above
D. none of above

-------------------------------------------------------------------------

21. Which is the correct position to place the <title> tag?
A. <body>
B. <table>
C. <head>
D None of the above

-------------------------------------------------------------------------

22. Which are two methods used while submitting HTML form?
A. GET
B. POST
C. SUBMIT
D. Both A & B

-------------------------------------------------------------------------

23. Default value for attribute BORDER is?
A. 1 px
B.  2px
C. 3 px
D. 4 px

-------------------------------------------------------------------------

24. Select correct HTML to add background color.
A. <body style="background-color:yellow">
B. <body background="yellow">
C. <body yellow>
D. All of the above

-------------------------------------------------------------------------
25. How to create an email link?

A. <a href="mailto:sapnagiyanwani@gmail.com">
B. <mail>
C. <a>malto</a>
D. None of the above

-------------------------------------------------------------------------


26. What is the abbreviation for  XHTML?

A. Extensible Hyper text markup language
B. Extensible High text markup language
C. None of the above

-------------------------------------------------------------------------

27. Which HTML tag is for the container of metatags?
A. <html>
B. <title>
C. <head>
D. <body>

-------------------------------------------------------------------------
28. Which tag is used for the client side script?

A. <body>
B. <css>
C. <style>
D. <script>

-------------------------------------------------------------------------

29. Which attribute is used to uniquely identify an HTML element?
A. id
B. #
C. style
D. css

-------------------------------------------------------------------------

30. Which attribute is used to merge two columns in the table tag?
A. rowspan
B. colspan
C. tr
D. td

-------------------------------------------------------------------------

31. What is the REFRESH meta tag used for?
A. Refresh page
B. Redirect to new domain
C. None of the above
D.Can't say

-------------------------------------------------------------------------

32. Which of the following is not an empty element?
A. <br>
B. <hr>
C. <p>
D. both <br> and <hr>

-------------------------------------------------------------------------


33. Can a Data cell contain image?

A. Yes
B. No

-------------------------------------------------------------------------


34. How to resize the image?

A. Using size attribute
B. Using width and height attribute
C. Both A & B.
D. None of the above

-------------------------------------------------------------------------


35. In which tag colspan is used?

A. <table>
B. <tr>
C. <td>
D. All of the above

-------------------------------------------------------------------------


36. Which attribute is used to identify an element uniquely?

A. id
B. class
C. style
D. All of the above

-------------------------------------------------------------------------


37. Which tag is used for the title text for row and column?

A. td
B. tr
C. th
D. None

38. Page designed in HTML is called

A. Web Page
B. Server Page
C. Front Page
D. Text Page

39. The symbol used at the beginning of the href tag is

A. @
B. #
C. $
D. %

40. Where do you place the title tag?

A. Body
B. Head
C. Meta
D. None

Tuesday, 26 June 2018

How to zip folder using c#

1. Open Visual Studio and create a new website
2. Add dll reference of System.IO.Compression and System.IO.Compression.FileSystem
3. On Button Click event write below code

            var folderPath = @"D:\testFolder";

            var toZipPath = @"D:\testFolder.zip";
            ZipFile.CreateFromDirectory(folderPath, toZipPath);

4.Run project 

Sunday, 27 May 2018

How to Open aspx page to new tab using C#



ScriptManager.RegisterStartupScript(this, this.GetType(), "OpenWindow","window.open('YourPage.aspx','_blank');", true);

Friday, 25 May 2018

How to run exe file using C#

1. Open Visual Studio and create a new website
2. Add namespace using System.Diagnostics;
3. On Button Click event write below code

         var Path = "C:\\Notepad.exe";

         Process.Start(Path);

4. Run Code.

Thursday, 24 May 2018

Upload file on FTP using C#


1. Open Visual Studio and create a new website

2. Add namespaces like using System.IO; and using System.Net;
3. On Button Click event write below code

string filename = Path.GetFileName(localFile);

                string ftpPath = ftpUrl;
                FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpPath);
                ftp.Credentials = new NetworkCredential(Username, Password);

ftp.UsePassive = true;

                ftp.KeepAlive = true;
                ftp.UseBinary = true;
                ftp.Method = WebRequestMethods.Ftp.UploadFile;
             
                FileStream fs = File.OpenRead(localFile);
                byte[] buffer = new byte[fs.Length];
                fs.Read(buffer, 0, buffer.Length);
                fs.Close();

                Stream ftpstream = ftp.GetRequestStream();

                ftpstream.Write(buffer, 0, buffer.Length);
                ftpstream.Close();

4.Run project and upload file.

Friday, 18 May 2018

How to Deploy ASP. Net Websites on IIS



Step 1: From Visual Studio, publish your Web application.
Step 2: From RUN -> inetmgr -> OK
Step 3: Add Application Pool for your Website Select Version V4 for Application Pool. And Select Pipeline Mode to Integrated
Step 4: From Sites ->Right click -> Add Website 

Step 5: Configure the Website
Give your Site name
Select Application Pool you created
Set Physical Path of your website
Set Bindings and Port of Website
Set Host Name and then Click OK



SQL server tricky questions