html, css basic questions, exercises, interview questions (1)

1. Which of the following is the HTML space characters
A div B p C b D  
The correct answer: D
analytical:
div document layout object
p paragraph
b bold
  spaces
2. From the point of view of optimization img Which of the following properties are optimized better
C D border alt height B a width
C: the correct answer
to resolve:
alt text is replaced when the picture is not displayed to appear. Also known as the name of the picture, to facilitate SEO search
3. In HTML, use the tag to insert an image, the following options for the src attribute statements is correct
A picture file format used to set
B to set the location of the picture file is located
C with to set the display when the mouse pointer to the picture of the text
D is used to set the text around the picture shows
the correct answer: B
Analysis:

<img src="图片的地址和全称" />

4. In HTML, if realized click the hyperlink to bring up a new web page window, which of the following options comply
A <a href="right.html" target="_blank">节目</a>
B <a href="right.html" target="_self">节目</a>
C <a href="right.html" target="_parent">节目</a>
D <a href="right.html" target="_top">节目</a>
The correct answer: A
parsing:
target = "_ blank" new window opens
target = "_ self" Current window open
essential part 5. in HTML, the following non-HTML document is
a <style></style>
B <body></body>
C <html></html>
D <head></head>
correct answer: a
Resolution:
the basic structure of the HTML composition

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
	</body>
</html>

6. HTML snippet below, XHTML-compliant specification is used
A <input type="text" value="hello">
B </br>
C <br/>
D <img src=" Welcome.jpg" alt="Welcome">
correct answer: C
Analysis:
single tag end tag is not
only applied to a trailing slash tag <br />
7. The following is a table in which attribute merged cells the properties of the pitch
a cellspacing
B cellpadding
C rowspan
D colspan
correct answer: a
resolution:
the distance between the cell and the cell cellspacing
gap between the cell content cellpadding
rowspan merged cell rows
colspan merged cell columns
8. in CSS stylesheet which the highest priority
a import stylesheet
B Waibuyangshibiao
C inline style sheet
D internal stylesheet
correct answer: C
Analysis:
when the three stylesheet exist, the inline style sheet priority highest.
9. BACKGROUND tiling effect can be achieved, corresponding to CSS
A div{backgroud-image:url(images/bg.gif);}
B div{backgroud-image:url(images/bg.gif) repeat-x;}
C div{backgroud-repeat:url(images/bg.gif) repeat-y;}
D div{backgroud-repeat:url(images/bg.gif) no-repeat;}
correct Answer: A
Resolution:
background-image property values behind the property can only add pictures path, because he is not a hybrid writing, tiled property value can not be added at the same time. When you add only the background image, background default tile.
10. The following options, which can attribute value outside of the right page margin to a label pixel 10
A margin: 10px 0 0 0;
B margin: 0 0 0 10px;
C margin: 10px 0 0 0;
D padding -right: 10px;
correct answer: a
Analysis:
the first is from the outside, it must be used in margin property, Gu D option is ruled out, then depending on how the margin property values, when four values are on the order of the lower-right-left , the value left four lower right (clockwise in sequence) so that selected A option.
11. In HTML, CSS-style argument is wrong
precisely control the A css styles can not be achieved page
B each style statement with a semicolon (;) separated
C css styles to achieve a separation of content and presentation, which will help the development team
D css attributes and their values in the colon connecting
the correct answer: a
parsing:
CSS accurate setting can be achieved. B, D option using CSS style specification, C is the advantage of CSS
12. The reading of the following HTML code, paragraph tag

Color display is in the final text

<style type="text/css"> 
     body { color:#333; } 
     #text{ color:#666; }
     .content { color:#00f; } 
     .gray { color:#f00; } 
</style> 

<p id="text" class="content gray">我我本将心向明月,奈何明月照沟渠。</p>

# F00 A
B # 00F
C # 666
D # 333
The correct answer: C
parsing:
ID selectors class selectors weight is greater than weight.

13. In HTML pages, if necessary in the CSS style sheet set the text font is the official script, you need to set the properties of the text

Font-Family A
B font-size
C-style font
D face
correct Answer: A
parsing:
font-Family set text font attributes.
font-size character size of the text
font-style attribute defines the font style (italic)
14. The following css attributes, is used to specify the background image
A background-Color
B Image background-
C background-position
D-REPEAT background
correct answer : B
analytical:
background color-background color attributes,
background Image-added attribute background,
background position-location attribute set background image,
background REPEAT-set tile properties.
15. The following CSS code has several grammatical mistakes TD {font-size &: 12px, Color: 666666;}
A. 1
B 2
C. 3
D. 4
correct answer: C
parsing:
CSS syntax: selector {properties: Property Value;}
The right to: td {font-size: 12px; Color: # 666666}
16. The order for the id for the div container can be centered horizontally, CSS style is required
A #container {width: 880px; padding : 0px auto;}
{#container width B: 880px; padding: Auto 0px;}
C #container {width: 880px; margin: Auto 0px;}
D {#container width: 880px; margin: Auto 0px;}
correct answer: D
Analysis:
block element centering way margin: Auto any value;
17. a following statement regarding the CSS box model error is
a box model is the basis for page layout, which includes a wide attributes Higher margins, borders, margins, and the element
B border ( borders) on behalf of the enclosure box frame
C margin (margin)
D padding (padding) represents the distance between the box and the other box
the correct answer: D
parsing:
padding (padding) represents the distance between the box and the inner elements
18. To use CSS to control the font size, you should set
a font-size
B font weight-
C font-style
D-Family font
correct answer: a
Analytical:
font-weight bold font-style font-family inclined Font
19.CSS box model attributes representing the distance between the frame and the content of
A padding
B margin
C border
D cellpadding
correct Answer: A
resolved:
margin border to the outer border is the distance between the border cellpadding for the table of contents to the border.
20. The description of the pseudo-HTML hyperlink type is incorrect
A a: link indicates when not click the hyperlink access pattern
B a: visited a rear access click the Hyperlink style
C a: hover the mouse was suspended thereon represents hyperlink style
D a: active representation click the hyperlink style and release
the correct answer: D
parsing:
a: shows the state of the Active hyperlinks are activated
21. read the following pages set the background image CSS code, the following statements is correct the background: Link (Images / new.gif) left-nO REPEAT;
a Link should be replaced by the src
B should be changed Link URL
C should be changed to nO-REPEAT no_repeat
D no syntax error
correct answer: B
analytical:
background: URL () left no-repeat
22. In HTML, the code on the following statement is wrong <a href="index.html" target="_blank">首页</a>
A This tag is used to create a hyperlink
B target window opens in the current window
C hyperlink address is connected to the amount index.html
D hyperlink text is the "Home"
the correct answer: B
parsing:
target = "_ blank" effect to open a blank window
23. About CSS control the font style statement is wrong
a font: bold 12px "Times New Roman", specifies the font to bold 12px Arial size
B font -type property specifies the type of font, such as Arial, Helvetica other
C font-size attribute specifies the font size
D font-weight property specifies the font weight
correct answer: B
analytical:
font text mode character set shorthand
font -type: without this attribute
24. the following statement is false
a password input box to set tag = type "password"
B submit button to set the input tag = type "RESET"
input of type C is empty button button
D value attribute the initial value may change as the user's operation, in order to prevail when submitting
the correct answer: B
Analysis:
submit button to set input = tag of the type "the submit"
25. the which of the following is not Linear border
Background A
B Solid
C Dashed
D Double
correct answer: A
parsing:
border to border attribute
26. Read the following HTML code to display selected as "Summer 1. 2. 3. spring 4. Autumn Winter" is (a list of symbol digital)?
A <ol><li>春天</li><li>夏天</li><li>秋</li><li>冬天</li></ol>
B <ul><li>春天</li><li>夏天</li><li>秋天</li><li>冬天</li></ul>
C <ol><li>春天</li><li>夏天</li><li>秋天</li><li>冬天</li></ul>
D <ul><li>春天</li><li>夏天</li><li>秋天</li><li>冬天</li></ol>
The correct answer: A
Analysis:
composed of an ordered list is <ol><li></li></ol>
composed of unordered list is <ul><li></li></ul>
27. HTML page, the method call is an external style sheet
A <style rel="stylesheet" type="text/css" href="外部样式表地址" />
B <link rel="stylesheet" type="text/css" href="外部样式表地址" />
C <style rel="stylesheet" type="text/css" link="外部样式表地址" />
D <link rel="stylesheet" type="text/css" style="外部样式表地址" />
The correct answer: B
Analysis:
external stylesheet connection method:

<link rel="stylesheet" type="text/css" href="外部样式表地址"/>

28. Which of the following can be achieved in the copyright page picture effect
A>
B <
C ©
D  
The correct answer: C
Resolution:
> greater than sign
<Less
© copyright symbol
 spaces
29. In HTML, the following table columns can achieve the merger is
A colspan attribute
B rowspan attribute
C colspan tag
D rowspan tags
correctly answer: A
Resolution:

<table >
    <tr>
        <td colspan="2"></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
</table>

colspan to the number of columns and cells
30.HTML in which the label is an unordered list
A div
B DL
C ul
D ol
correct answer: C
parsing:
ul unordered list
ol ordered list
Second, multiple-choice (20 questions, 2 points each)
1. the following are properties belonging to a label
a title
B target
C the src
D the href
correct answer: a, B, D
resolved:
the src attribute of the image
2. the following elements as a single marker is
a br
span B
C strong
D HR
correct answer: A, D
resolution:

3. The following attributes belonging css control text font, or are:
A a float
B margin
C Color
D font-weight
correct answer: C, D
parsed:
Color Text Color text bold font-weight
4. The following statement may be the background color are set to red
a Color: red;
B background: red;
C-background Color: red;
D-font Color: red;
correct answer: B, C
Analysis:
property background for background
5. the default element are bold
B a
B strong
C U
D I
correct answer: a, B
6. the following attributes are correct wording
a padding: -10px
B padding: 10px
C margin: 10px
D margin: -10px
correct answer: B, C, D
Analysis:
padding can write negative, margin can write negative
7. there are elements belonging to the table
a table
B HR
C SELECT
D tr
correct answer: A, D
8. The attributes are set merging table
A cellspacing
B colspan
C cellpadding
D rowspan
correct answer: B, D
9. The insert may be provided with a background image properties
A background-Image
B background REPEAT-
C background -attachment
D background
correct answer: a, D
priority right has the following css selector 10.
a ID: 0100
B class: 0001
C tag selector: 0010
D class: 0010
correct answer: a, D
11. the following properties clear clear float value belongs is
a left
B right
C both
D Center
correct answer: a, B, C
Resolution:
12 custom page title tag has content which
a h1 of
B title
C H6
D H7
correct answer: a, C
13. The following table may be provided which properties the horizontal alignment or vertical alignment table
A cellspacing
B align = left
C colspan
D valign
correct answer: B, D
14. A link may be opened in a new window
A <a href=“www.baidu.com”target=“self”>我是文字 </a>
B <a href=“http://www.baidu.com”target=“_blank” >我是文字</a>
C <a href=“images/logo.jpg” target=“_blank”>我是文字</a>
D <a href=“images/logo.jpg” target=“_self”>我是文字</a>
correct answer: B, C
15. A following its correct definition is a paragraph style and font size, format
a p {font-size: 14px ; font-family: " Times New Roman";}
B {font-P Family: "Times New Roman"; font-size: 14px ;}
C P {font-size: "Times New Roman"; font-Family: 14em;}
D P {font-Family: 800; font-size: 14em;}
correct answer: a, B
16. a <a></a>pseudo-class selector is not comprising
A A: Link
B A: onfouce
C A: visited
D A: the onclick
correct answer: B, D
17.HTML list comprising
A ordered list
B unordered list
C custom list
D public list
correct answer: A, B , C
Resolution:
There are three list in HTML, there unordered list ul> li, ordered list ol> li and custom list <dl><dt></dt><dd></dd></dl>
18. The border line of the border attribute set has the following
A border-style
B border-width
C-size border
D border- color
correct answer: a, B, D
resolved:
border composite properties, the border-width, border-style, border-color composition
effect 19. want to achieve a text bold, which is of the following methods
a <b>我是文字文字文字</b>
B font -weight: 800;
C font-weight: 300px by;
D <i>我是文字文字文字</i>
correct answer: a, B
20. a following code <div class=“a”></div> <div class="b"></div>where css is defined as follows .a{width: 200px;height: 200px;background-color: #f00;float: left;} .b{width: 300px;height: 300px;background-color: #ff0;}the following statement is correct ()
a two boxes can overlap
B element a over the element B
C b element in the element over a
D two elements are arranged around the
correct answer: a, B
analytical:
float: left principle add float: left right space element will be "reserved" and wait for the next element to float stations

Guess you like

Origin blog.csdn.net/ZHANGJIN9546/article/details/92773669