1+X Web front-end (primary) theoretical exam sample questions and answers (recommended collection)

Judging rules


There are 50 theoretical questions in total, including: 30 single-choice questions, 15 multiple-choice questions, and 5 judgment questions (2 points for each question, no points for multiple-choice questions, 1 point for less choices, 2 points for all correct answers) point)
 

(1) Multiple Choice Questions

1. Which of the following statements about web page structure is wrong ()

A. The HTML file is the structural layer

B. The CSS file is the presentation layer

C, JS file is the behavior layer

D. The CSS file is the behavior layer

2. Set the style for the element whose id is con in the following code is correct ().

<div class=”box”>

<div class="main" id="con">Good luck! </div>

</div>

A. .box>.main{font:16px;} B. .box .main{font:16px 'Microsoft Yahei'}       

C. #con{font-family:16px} D. .con{font:16px/32px 'Microsoft Yahei'}

3. The correct statement about the setting of the margin is ().

A. margin:0 is to set the inner margin to 0 at the top, bottom, left, and right;

B. margin: 20px 50px; is to set the left and right margins to be 20px, and the top and bottom to be 50px;

C. margin: 10px 20px 30px; is to set the inner margin as 10px on the top and 20px on the bottom; 30px on the left;

D. margin: 10px 20px 30px 40px; is to set the outer margin to 10px on the top, 20px on the right, 30px on the bottom, and 40px on the left

4. The statement about the box model is incorrect ()

A. The box model consists of four parts: margin, border, padding, and content;

B. The standard box model is box-sizing: border-box;

C. The IE box model is box-sizing: border-box;

D. The standard box model is box-sizing: content-box;

5. Which of the following descriptions about HTML is incorrect ()

A. HTML is a language for describing web pages

B. HTML is a programming language

C. HTML is made up of markup tags

D.HTML is hypertext markup language

6. Which of the following options is correct about the label default style ().

A. The title label is only bold by default

B. Paragraph tags have margins and margins by default

C. Unordered lists have margins and margins by default

D. input has no default style

7. In HTML, the statement of the text attribute in the CSS style is wrong ().

A. font-weight is used to set the thickness of the font

B. font-family is used to set the font type of the text

C, color is used to set the color of the text

D. text-align is used to set the font shape of the text

8. In HTML, usually through positioning, the vertical stacking order can be set in () in the Css attribute.

A、list-style

B、padding

C、z-index

D、Float

9. The wrong statement about html5 is ().

A. HTML5 adds audio and video tags

B. HTML5 is just a simple upgrade to HTML4

C. All major browsers support HTML5

D. HTML5 adds an offline caching mechanism

10. Which of the following is not a new feature of HTML5 is ().

A. New @font-face font settings

B. New offline storage

C. New audio and video API

D. New Content Tab

11. The following are target selectors ().

A、.:empty      B、:target      C、:nth-of-type()   D、only-child

12. The attribute to realize the scrolling of the background picture without following the mouse scroll is ()

A、background-attachment:fixed;

B、background-attachment:scroll;

C、background-origin: initial;

D、background-clip: initial;

13. The correct description of the characteristics of the alt and title attributes is ().

A. Different browsers perform the same

B. When alt and title are set at the same time, alt appears as the alternative text of the picture, and title is the explanatory text of the picture

C. When alt and title are set at the same time, the title appears as an alternative text of the picture, and alt is the explanatory text of the picture

D. None of the above statements are correct

14. Set the property of rounding the corners of the mouse after the div box is ().

A、box-sizing    B、box-shadow     C、border-radius     D、border

15. In the elastic box, the following values ​​that do not belong to justify-content are ().

A、flex-start     B、center          C、space-between    D、end

16. Select a different one from the following options ().

A、<nav>       B、<footer>        C、<meta>          D、<canvas>

17. The calculation result of ("5.3" + 2.3) is ().

A、7.6        B、5.32.3          C、5.32          D、7.3

18. The JavaScript function statement is correct ()

A. No parameters can be passed B. Parameters can be accepted

C. No return type D. No return keyword

19. JavaScript is a scripting language that runs in ().

A. Server side

B. After the server runs, return the result to the client

C. After the client runs, return the result to the server

D. Client

20. Which of the following methods is used to sort array elements ().

A、add( )       B、join( )      C、sort( )      D、length( )

21. Analyze the following JavaScript code segment, the output result is ()

var str="I am a teacher";

a=str.charAt(9);

document.write(a);

A、I am a te    B、a          C、acher      D、e

22. Analyze the following JavaScript code segment, the output result is ().

emp=new Array(4);

emp[1]=1;

emp[2]=2;

document.write(emp.length);

A、2         B、3          C、4         D、5

23. Which of the following does not belong to the commonly used data types provided in javascript ().

A、Undefined     B、Null     C、Connection     D、Number

24. In JavaScript, the correct way to convert the string "789" to the integer value 789 is ()

A、var str="789"; var num=(int)str;

B、var str="789";var num=str.parseInt(str);

C、var str="789";var num=parseInt(str);

D、var str="789";var num=Integer.parseInt(str);

25. The correct result of the following code is ().

var a = [0];

if ([0]) {

console.log(a == true);

} else {

console.log("2");

}

A, true B, false C, "2" D, error

26. What is the output of the following code ().

var trees = ["aa","bb","cc","dd","apple"];

delete trees[3];

console.log(trees.length);

A, 5 B, 4 C, 3 D, none of the above is correct

27. The result of the following code output is: ().

    var length = 20;

    function fn() {

        console.log(this.length);

    }

    var obj = {

      length: 10,

      method: function(fn) {

        fn();

        arguments[0]();

      }

    };

    obj.method(fn, 1,"aa");

A, 20,10 B, 10,3 C, 20,3 D, none of the above is correct  

28. In jQuery, the method to remove the div element under the node class name "box" is ().

A、$(".box div").remove();

B、$(".box div").empty();

C、$("div").innerhtml("");

D、$("div").innerHTML = "";

29. Use jQuery to convert the string in JSON format returned by the server into a js object. Is the syntax correct ()?

A、$.parseJSON(data)             B、$.ParseJson(data)

C、 #.parseJSON(data)            D、 #.ParseJson(data)

30. Which of the following options is wrong about the fade-in and fade-out animation effect in jQuery ().

A. The fadeOut() method realizes the fade-out effect of the matched element through the change of opacity

B. The parameters of fadeOut(), fadeIn(), and fadeToggle() that indicate the animation duration can only be milliseconds

C. fadeToggle() switches the fade-in and fade-out effects of all matching elements by changing the opacity

D. fadeOut(), fadeIn() can be commonly used to make slide effects that fade in and out

 

(2) Multiple choice questions

1. Which of the following statements about hidden elements is correct ().

A. display: none; do not reserve physical space for hidden objects;

B. visibility: hidden; the occupied space still exists, only visually completely transparent;

C, visibility: hidden; generate reflow and repaint (reflow and repaint);

D. visibility: hidden; and display: none; there is no essential difference between the two;

2. For browsers with different kernels, the correct interpretation of CSS is ().

A. The embedded div of FireFox's div can expand the height of the parent, but IE6.0 cannot, you have to set the height yourself

B. When set to three-column layout, the float width of FireFox0 cannot reach 100%, but that of IE6. When set to a two-column layout, both browsers are fine

C. In the Firefox browser, there is a float div with the same parent in front of the non-float div. If this div has a background image, you need to use clear:both to display the background image, but it is not necessary to use clear:both in IE6.0

D. Under the property of [text-decoration: underline], the underline displayed by IE6.0 will be lower than that of FireFox. In FireFox, part of the stroke will be about 1 pixel below the underline

3. What are the following recommended ways to clear the float ().

A. Add an empty tag at the end of the floating element such as <div style="clear:both"></div>

B. By setting the overflow value of the parent element to hidden

C. The parent element is also set to float

D. Add a clearfix class to the parent element

4. Regarding the difference between border:none and border:0, the wrong description is ().

A. border:0 means the border width is 0

B. When border:none is defined, the display of the border is hidden, and the actual width of the border is 0

C. When defining the border, only setting the width of the border can also achieve the display effect

D. border:none means no border style  

 

5. Which of the following expressions returns true ().

A、!(3<=1)                      B、(4>=4)&&(5<=2)

C、("a"=="a")&&("c"!="d")         D、(2<3)||(3<2)

6. Among the statements about arrays in Javascript, the correct one is ().

A. The length of the array must be given when it is created, and it cannot be changed afterwards

B. Since arrays are objects, creating an array requires the use of the new operator

C. The types of elements in the array can be different

D. Arrays can be initialized at the time of declaration 

7. Which of the following statements about DOM in javascript is correct ().

A. The full name of DOM is Document Object Model;

B. BOM is the document object model;

C. The function of DOM is to add, delete and replace the content of the page;

D. BOM is the browser object model

 

8. Which return types () are supported in jquery ajax.

A、xml        B、html      C、jsonp       D、json

9. The new tag of HTML5 is ().

A、figure     B、hgroup     C、details      D、progress

10. The following are inline block elements ().

A、img       B、input      C、span         D、div

11. The following are HTML5 advantages ().

A. Solve cross-platform problems

B. Partial tags replace the original JavaScript

C. More explicit semantic support

D. Enhanced web applications and functionality

12. It is () that belongs to the syntax change of HTML5.

A. Labels are no longer case-sensitive

B. Elements can omit the end tag

C. Properties that support boolean values

D. Allow attribute values ​​without quotation marks

13. The following is the new pseudo-class of CSS3 is ().

A、:nth-of-type(n)     B、:empty     C、:root     D、:not()

14. What are the values ​​of box-sizing ().

A、none       B、border-box     C、content-box     D、padding-box

15. In jQuery, the statement that can hide the div layer is ().

A、$("div").css("display","none")

B、$("div").addClass ("display","none")

C、$("div").show()

D、$("div").hide()

 

(3) True or False

1、"12">"2"。

2. In the DOM, if a node is known and their positional relationship is known, any node can be operated.

3. The definition list should be written like <dl><dt><dd></dd></dt></dl>.

4. In HTML, div+css can be used for typesetting layout, and tables can also be used.

5. The position occupied by div is one line, and one line can display multiple spans.

 

Answer

1D 2B 3D 4B 5B 6C 7D 8C 9C 10A 11B 12A 13B 14C 15D 16D 17B 18B 19D 20C 21A 22C 23C 24C 25B 26A 27C 28A 29A 30B

1AB 2CD 3ABD 4BC 5ACD 6BCD 7ACD 8ABCD 9ABDC 10AB 11ABCD 12ABCD 13ABCD 14BC 15AD

1x 2o 3z 4x 5o

 

Guess you like

Origin blog.csdn.net/fujian87232/article/details/116104647