html面试常问题_HTML面试问答

html面试常问题

Here are 50+ commonly asked HTML interview questions and answers which will definitely help you in toughest interviews.

这里有50多个常见HTML面试问题和答案,这些绝对可以帮助您完成最困难的面试。

1. Explain Semantic HTML? Semantic HTML is a Style of Programming. It is basically making use of HTML Markup to reinforce the Meaning of the Content. Example: In semantic HTML , we prefer to use <strong> Tag instead of <b> Tag for Bold Statements.Similarly, we prefer to use <em> Tag instead of <i> Tags for Italic Statements.

1.解释语义HTML? 语义HTML是一种编程风格。 它基本上是利用HTML标记来增强内容的含义。 示例:在语义HTML中,我们更喜欢将<strong>标记而不是<b>标记用于粗体语句。同样,我们更喜欢将<em>标记而不是<i>标记用于斜体语句。

2. What is LongDesc in HTML? Longdesc is an attribute that allows you to provide a Link to another page that contains a description of the frame contents. For example: longdesc=”framedescription.html”.

2. HTML中的LongDesc是什么? Longdesc是一个属性,允许您提供到另一个页面的链接,该页面包含框架内容的描述。 例如:longdesc =” framedescription.html”。

HTML Interview Questions and Answers

Image Source

图片来源

3. Explain the Drawbacks of using FRAME Tag. 1. Some compact devices such as Tablets and Mobile Phones cannot cope up with the content within a FRAME Tag due to Screen Resolution issues. 2. The Browser’s Back Button may not work as expected. 3. Sometimes, the Web pages may be showcased in different manner depending upon the Device. 4. There are few handful of Browsers that do not support FRAME Tags

3.解释使用FRAME标签的缺点。 1.由于屏幕分辨率问题,某些紧凑型设备(例如平板电脑和手机)无法处理FRAME标签中的内容。 2.浏览器的后退按钮可能无法正常工作。 3.有时,取决于设备,网页可能会以不同的方式展示。 4.少数浏览器不支持FRAME标签

4. What is Cell Spacing? Cell Spacing is an Attribute that defines the Width of the Border of an HTML Web Page. It basically controls the Space between Table Cells. It is done by determining the Pixel Width.

4.什么是单元间距? 单元格间距是定义HTML网页边框宽度的属性。 它基本上控制表单元格之间的空间。 通过确定像素宽度来完成。

5. What is Form Get? The Form data is encoded into a URL by the Browser. The form data is Visible in the URL which helps to Bookmark the Content. The form data is restricted to ASCII codes.

5.什么是表格获取? 表单数据由浏览器编码为URL。 表单数据在URL中可见,这有助于为内容添加书签。 表格数据仅限于ASCII码。

6. What is a Marquee? Marquee is used to display a Scrolling Text on a Web Page. You should put the text which you want to scroll within the <marquee>……</marquee> Tag. You can optionally add color to the Text and even the sequence of the Scroll.

6.什么是跑马灯? 选取框用于在网页上显示滚动文本。 您应该将要滚动的文本放在<marquee>……</ marquee>标记内。 您可以选择将颜色添加到“文本”,甚至是“滚动”序列中。

7. How to make a picture a background image of a web page? In order to make a picture as a Background of any particular Web page, you need to manipulate the BODY Tag which occurs after HEAD Tag. Eg.: <BODY Background = “image1.png”> Background is an Attribute which takes the Image Source.

7.如何使图片成为网页的背景图像? 为了使图片成为任何特定网页的背景,您需要操纵在HEAD标签之后出现的BODY标签。 例如:<BODY Background =“ image1.png”> Background是获取图像源的属性。

8. What is Cell Padding? Cell Padding is an Attribute that defines the Space between the Contents of the Cell. It is basically used to define space between different Cells and also within every Cell., while cellpadding represents the distance between the content within a cell and cell borders.

8.什么是细胞填充? 单元格填充是定义单元格内容之间空间的属性。 它基本上用于定义不同单元格之间以及每个单元格内的空间,而单元格填充表示单元格内的内容与单元格边界之间的距离。

9. What is the difference between SPAN and DIV? DIV is container or area that usually is used to layout element or group of elements. DIV is basically used to highlight an Area or a Block of Text in a HTML Web Page so that one can apply Styles to it. DIV tag is also an alternative to the Paragraph tag <p> as it creates a logical division of an HTML document.

9. SPAN和DIV有什么区别? DIV是通常用于布局元素或元素组的容器或区域。 DIV基本上用于突出显示HTML网页中的区域或文本块,以便人们可以对其应用样式。 DIV标记也是Paragraph标记<p>的替代方法,因为它创建了HTML文档的逻辑划分。

SPAN is used for Formatting Elements within SPAN Block. SPAN is used to select Inline Text and allows users to apply different Styles to it. doesn’t have own container or area.

SPAN用于格式化SPAN块中的元素。 SPAN用于选择嵌入式文本,并允许用户对其应用不同的样式。 没有自己的容器或区域。

10. Explain Tag. A Tag is basically used to indicate the Browser about the work that the Browser needs to perform. When you write any Text within an HTML Webpage, you generallyy write it within a Tag which helps the Browser to now what function it needs to perform.

10.解释标签。 标记基本上用于向浏览器指示浏览器需要执行的工作。 当您在HTML网页中编写任何文本时,通常会将其写在标签中,该标签可帮助浏览器确定其需要执行的功能。

11. What is the difference between HTML and HTML 5? HTML 1.0 included all specifications forrepresenting Text and Images on a Web page. It also includes providing Semantic data which allows automated categorization and correlation of HTML documents.

11. HTML和HTML 5有什么区别? HTML 1.0包含了用于在网页上表示文本和图像的所有规范。 它还包括提供语义数据,该数据允许对HTML文档进行自动分类和关联。

HTML5 is very different from HTMl5. It is more of an Application Development Platform, that includes Text, Images, Video, Audio, Interactive 2D and 3D graphics, storing data in the application, Real-Time Networking and much more.

HTML5与HTMl5非常不同。 它更多地是一个应用程序开发平台,包括文本,图像,视频,音频,交互式2D和3D图形,在应用程序中存储数据,实时网络等等。

12. What is a Button Tag? The Button Tag is supported in latest version of HTML i.e., HTML 5. It is primarily used to create a Button within HTML form on a web page. This Button can be clicked to generate an Event. It is usually used to create a “Reset” or a “Submit” Button.

12.什么是按钮标签? 最新版本HTML(即HTML 5)支持Button标记。它主要用于在网页上HTML表单内创建Button。 可以单击此按钮以生成事件。 通常用于创建“重置”或“提交”按钮。

13. What are Inline Elements? Inline Elements are those that can appear within any sentence and they need not appear on a New Line. This can be performed by the following Tags: <em>,<ins>, <i>, <strong>, <b >, <sub>, <big>, <li>, <del>, <u >, <sup>

13.什么是内联元素? 内联元素是可以出现在任何句子中的元素,而不必出现在换行符上。 这可以通过以下标记执行:<em>,<ins>,<i>,<strong>,<b>,<sub>,<big>,<li>,<del>,<u>,<上>

14. What is SPAN Tag used for? SPAN is used for Formatting Elements within SPAN Block. SPAN is used to select Inline Text and allows users to apply different Styles to it. doesn’t have own container or area.

14. SPAN标签的用途是什么? SPAN用于格式化SPAN块中的元素。 SPAN用于选择嵌入式文本,并允许用户对其应用不同的样式。 没有自己的容器或区域。

15. What is the difference between HTML elements and tags? HTML elements are used to communicate details to the Web Browser for Text Rendering purposes. When the HTML Elements are surrounded by Brackets <>, they are converted into HTML Tags. Usually, Tags come in pair and surround content.

15. HTML元素和标签之间有什么区别? HTML元素用于将详细信息传达给Web浏览器以进行文本渲染。 当HTML元素被方括号<>包围时,它们将转换为HTML标签。 通常,标签是成对和环绕内容。

16. Explain DIV Tag? DIV is container or area that usually is used to layout element or group of elements. DIV is basically used to highlight an Area or a Block of Text in a TML Web Page so that one can apply Styles to it. DIV tag is also an alternative to the Paragraph tag <p> as it creates a logical division of an HTML document.

16.解释DIV标签? DIV是通常用于布局元素或元素组的容器或区域。 DIV基本上用于突出显示TML网页中的区域或文本块,以便人们可以对其应用样式。 DIV标记也是Paragraph标记<p>的替代方法,因为它创建了HTML文档的逻辑划分。

17. Explain META Tag? It’s primarily used by Web Browsers and Search Engines to Lookup for Keywords. The <meta> tag provides Information about the HTML document. Metadata is Data about Data. It is used to store details such as Page Expiry, Page Author, Keyword List, Page Description

17.解释META标签? Web浏览器和搜索引擎主要使用它来查找关键字。 <meta>标记提供有关HTML文档的信息。 元数据是关于数据的数据。 它用于存储详细信息,例如页面到期时间,页面作者,关键字列表,页面描述

18. How to include Comments in HTML? HTML uses SGML Comment Syntax as HTML is an SGML application. The complete syntax is complex, and most browsers don’t support. Therefore, a shorter but the best way is: An HTML comment:<!–Comment–>

18.如何在HTML中包含注释? HTML使用SGML注释语法,因为HTML是SGML应用程序。 完整的语法很复杂,大多数浏览器都不支持。 因此,一种较短但最佳的方法是: HTML注释:<!– Comment–>

19. What is Form Post? The name value pairs are submitted in the message body of the HTTP request with Form Post. The name value pairs cannot be seen in the web browser bar. It does not have any restrictions on the length of the string.

19.什么是表格过帐? 名称值对通过Form Post在HTTP请求的消息主体中提交。 名称值对在Web浏览器栏中看不到。 它对字符串的长度没有任何限制。

20. What is a Script? A Script is a piece of a program that can add Interactivity features to your website. A Script can help to generate a Pop-Up Alert Box Message, or develop a Dropdown Menu. You can write different concise functions, known as Event Handlers, using any of the Scripting Language such as VB Script or JavaScript and then you can trigger those functions using HTML attributes.

20.什么是脚本? 脚本是程序的一部分,可以向您的网站添加交互功能。 脚本可以帮助生成弹出警报框消息,或开发下拉菜单。 您可以使用任何脚本语言(例如VB脚本或JavaScript)编写不同的简洁函数(称为事件处理程序),然后可以使用HTML属性触发这些函数。

21. Can a Web page contain Multiple Headers within a single HTML Document? Yes. An HTML Document can contain multiple Headers within a single document. Usually, HEADER Tag is used to serve the function in relation to whatever its Parent section may be. So, a HEADER Tag can be included in a BODY TAG, an ARTICLE Tag and much more.

21.网页可以在一个HTML文档中包含多个标题吗? 是。 一个HTML文档可以在一个文档中包含多个标题。 通常,HEADER标签用于与其父节可能无关的功能。 因此,HEADER标签可以包含在BODY标签,ARTICLE标签等中。

22. Explain FONT Tag. The FONT Tag is used to manipulate the shape and size of a Text on a Web page. It requires a Closing Tag. However, the FONT Tag and the BASEFONT Tags have been taken off from HTM5. So, the best option to change the FONT is to use it within CSS. It has the following attributes: Color, Size, Face, etc.

22.解释FONT标签。 FONT标签用于操纵网页上文本的形状和大小。 它需要一个结束标签。 但是,FONT标签和BASEFONT标签已从HTM5中删除。 因此,更改FONT的最佳选择是在CSS中使用它。 它具有以下属性:颜色,大小,面部等。

23. Explain the Difference between Cell Spacing and Cell Padding? Cell Spacing is an Attribute that defines the Width of the Border of an HTML Web Page. It basically controls the Space between Table Cells. Cell Padding is an Attribute that defines the Space between the Contents of the Cell. Cell Spacing is basically used to define space between different Cells and also within every Cell, while cellpadding represents the distance between the content within a cell and cell borders.

23.解释单元格间距和单元格填充之间的区别吗? 单元格间距是定义HTML网页边框宽度的属性。 它基本上控制表单元格之间的空间。 单元格填充是定义单元格内容之间空间的属性。 单元格间距基本上用于定义不同单元格之间以及每个单元格内的空间,而单元格填充表示单元格内的内容与单元格边界之间的距离。

24. Enlist Features of HTML 5. 1. Provisions for Extension to JavaScript Application Programming Interface (API) that includes Caching, Geo-Locations, Storage, Drag and Drop and much more.

24.征用HTML 5的功能 。1.提供JavaScript应用程序编程接口(API)扩展的规定,其中包括缓存,地理位置,存储,拖放等。

2. Updated List of Form Controls: <time>,<url>, <calendar>, <email>, <date>, <search>.

2.更新了表单控件列表:<时间>,<URL>,<日历>,<电子邮件>,<日期>,<搜索>。

3. Improved Support for Graphics, Video and Audio Data via Embedding Tags such as <video>, <canvas> and <audio>.

3.通过嵌入标记(例如<video>,<canvas>和<audio>)改进了对图形,视频和音频数据的支持。

4. Updated Semantic Tags includeing <main>,<aside>, <section>, <nav>, <header>, <article> and <footer>.

4.更新了语义标签,包括<main>,<aside>,<section>,<nav>,<header>,<article>和<footer>。

25. Can we include Javascript Code within HTML Web Page? If yes, then how? <script type=”text/javascript”> </script> <html> <body> <script> alert(‘Hello, World!’) </script> </body> </html>

25.我们可以在HTML网页中包含Javascript代码吗? 如果是,那怎么办? <script type =“ text / javascript”> </ script> <html> <body> <script> alert('Hello,World!') </ script> </ body> </ html>

26. Enlist the Internationalization Attributes for XHTML Element. 1. XML: Lang 2. DIR 3. LANG

26.登记XHTML元素的国际化属性。 1. XML:Lang 2. DIR 3. LANG

27. What is CSS? CSS is an abbreviated form of Cascading Style Sheets. It provides easy and effective alternatives to specify various attributes for the HTML Tags. Using CSS, you can mention a Style properties for any HTML element. Without the need of mentioning the details separately in every Web Page, you can just make a .CSS file and fill in the details there. It will automatically be updated to every .HTML Web page.

27.什么是CSS? CSS是层叠样式表的缩写形式。 它提供了简单有效的替代方法来为HTML标签指定各种属性。 使用CSS,您可以为任何HTML元素提及样式属性。 无需在每个网页中分别提及细节,您只需制作一个.CSS文件并在其中填写细节。 它将自动更新到每个.HTML网页。

28. What is difference between Form Get and Form Post? Get The Form data is encoded into a URL by the Browser. The form data is Visible in the URL which helps to Bookmark the Content. The form data is restricted to ASCII codes.

28. Form Get和Form Post有什么区别? 获取 表单数据由浏览器编码为URL。 表单数据在URL中可见,这有助于为内容添加书签。 表格数据仅限于ASCII码。

Post The name value pairs are submitted in the message body of the HTTP request with Form Post. The name value pairs are invisible in the web browser bar. It does not have any restrictions on the length of the string.

发布 名称值对通过Form Post在HTTP请求的消息正文中提交。 名称值对在Web浏览器栏中不可见。 它对字符串的长度没有任何限制。

Form Post and Form Get primarily correspond to different HTTP requests and they are submitted in different ways. Different Decoding techniques may be needed as the data is encoded in different ways.

Form Post和Form Get主要对应于不同的HTTP请求,并且它们以不同的方式提交。 由于数据是以不同的方式编码的,因此可能需要不同的解码技术。

29. Enlist the Form Elements. There are various form elements available which are as follows: 1. Text Fields 2. Textarea field 3. Dropdown Menus 4. Radio buttons 5. Checkboxes

29.征集表单元素。 可用的表单元素如下: 1.文本字段 2. Textarea字段 3.下拉菜单 4.单选按钮 5.复选框

30. Explain DOCTYPE Tag in HTML? It referes to the Document Type Definition. It mentions the rules for the Markup Language for the Browser to render the Content correctly. The DOCTYPE is not mandatory in HTML5 now. However, it needs to be placed before the HTML Tag i.e., the very first line of any HTML Document. It is not an HTML Tag but an instruction to the Web Browser that indicates the Version of the Markup Language that the Web Page is written in.

30.用HTML解释DOCTYPE标签吗? 它引用文档类型定义。 它提到了用于浏览器的标记语言以正确呈现内容的规则。 DOCTYPE现在在HTML5中不是必需的。 但是,需要将其放置在HTML标记之前,即任何HTML文档的第一行。 它不是HTML标记,而是Web浏览器的一条指令,指示编写网页所用的标记语言的版本。

31. Explain XHTML. XHTML stands for Extensible HyperText Markup Language. It is almost Identical to HTML. It is more strict in terms of syntax as compared to HTML. XHTML is an extension of HTML that includes XML application i.e, Extensible Markup Language. The major benefit of using is XHTML is that it is supported by all the major Web Browsers.

31.解释XHTML。 XHTML代表可扩展超文本标记语言。 它几乎与HTML相同。 与HTML相比,它在语法方面更加严格。 XHTML是HTML的扩展,其中包括XML应用程序,即可扩展标记语言。 使用XHTML的主要好处是所有主要的Web浏览器都支持XHTML。

32. What is IFRAME tag? IFRAME Tag is basically used to Embed the documents within an HTML Document. However, the latest developments in HTML 5 has taken off support for the IFRAME Tag and hence you should avoid using it.

32.什么是IFRAME标签? IFRAME标记基本上用于将文档嵌入HTML文档中。 但是,HTML 5的最新开发取消了对IFRAME标签的支持,因此您应避免使用它。

33. What extensions does an HTML Web Page use? The extensions used by an HTML document are: 1. .html 2. .htm However, you should stick on with .html format as it a convention and looks more efficient.

33. HTML网页使用什么扩展名? HTML文档使用的扩展名是: 1. .html 2. .htm 但是,您应该坚持使用.html格式,因为这是一种约定,而且看起来效率更高。

34. Do all HTML Tags have an Ending Tag? No. Most of them have an Ending Tags. However, there are few that do not need an Ending Tag such as <BR/> and <HR/> Tags. It is not mandotory to use an ending tag for these two Tags.

34.所有HTML标记都有结尾标记吗? 否。大多数标签都有结尾标签。 但是,很少有不需要结束标签的标签,例如<BR/>和<HR />标签。 对这两个标签使用结尾标签并不是强制性的。

35. Enlist some common Lists that are used in designing an HTML Web page? There are many common lists which are used to design a page. You can select any combination or even a single list of the following list types: 1. Definition List 2. Menu List 3. Ordered List 4. Directory List 5. Unordered List

35.列出设计HTML网页时使用的一些常见列表吗? 有许多用于设计页面的常见列表。 您可以选择以下列表类型的任意组合或什至一个列表: 1.定义列表 2.菜单列表 3.有序列表 4.目录列表 5.无序列表

36. What is a Box Model? Every Element on a Page is a Rectangular Box and may have Width, Height, Padding, Borders, and Margins. Every section of the box model relates to a CSS property: width, height, padding, border, and margin.

36.什么是盒子模型? 页面上的每个元素都是一个矩形框,并且可以具有宽度,高度,填充,边框和边距。 盒子模型的每个部分都与CSS属性相关:宽度,高度,填充,边框和边距。

37. How can you insert an Image within an HTML Document along with different attributes? You can insert any Image within an HTML Document using the IMG Tag. It makes use of multiple attributes that helps to showcase the image in a better way. This tag doesn’t require an Ending Tag like other Tags.

37.如何在HTML文档中插入图像以及不同的属性? 您可以使用IMG标签在HTML文档中插入任何图像。 它利用多个属性来帮助更好地展示图像。 与其他标签一样,此标签不需要结尾标签。

<img src=image1.png” alt=”thecrazyprogrammer” height=”25″ width=”30″>

<img src = image1.png” alt =“ thecrazyprogrammer” height =“ 25” width =” 30“>

38. What are Hyperlinks? Hyperlinks contain contents linked to other URL. It helps the visitors to Navigate between Web Sites or Web Pages within the Same Website. It can be linked to Text or an Image on a Webpage.

38.什么是超链接? 超链接包含链接到其他URL的内容。 它可以帮助访问者在同一网站内的网站或网页之间导航。 它可以链接到网页上的文本或图像。

39. What is Noresize used for? Noresize attribute is used within Frames. It is used to prevent a User from resizing the Frame within an HTML Document. However, a Frame is resizable by default and you can do it by Clicking and Dragging the Borders of any Frame.

39. Noresize的用途是什么? 在框架内使用Noresize属性。 它用于防止用户调整HTML文档中框架的大小。 但是,默认情况下,框架是可调整大小的,您可以通过单击并拖动任何框架的边框来实现。

40. What are Block Elements? These are the elements that appear on the screen in terms of a Bloc. They have a Line Space Before and After the Starting and Ending Tags respectively. They start on a New Line. The Following Tags are used for Block Elements: HR, ADDRESS, HEADING, OL, PRE, BLOCKQUOTE, DL

40.什么是块元素? 这些是按照Bloc出现在屏幕上的元素。 它们分别在“开始”和“结束”标记之前和之后都有一个行距。 他们从换行开始。 以下标记用于块元素: HR,ADDRESS,HEADING,OL,PRE,BLOCKQUOTE,DL

41. What are HTML Forms? HTML Forms are needed when you want to collect Data from the Visitor. It is used to collect things such as name, email address, credit card number, etc. A form will take input from the Visitor and will store it to Back-End application such as CGI, ASP Script or PHP script etc.

41.什么是HTML表单? 当您想从访问者那里收集数据时,需要HTML表单。 它用于收集诸如姓名,电子邮件地址,信用卡号等信息。表单将从访问者那里获取输入并将其存储到后端应用程序中,例如CGI,ASP Script或PHP脚本等。

42. What is EMBED Tag? Embed Tag is used to include a Video or an Audio withing an HTML Document. The Embed Tag requires a Closing Tag. It requires the Source of the Video or the Audio file that needs to be displayed onto the Page. Syntax: <EMBED> Source File </EMBED>

42.什么是EMBED标签? 嵌入标签用于在HTML文档中包含视频或音频。 嵌入标签需要一个结束标签。 它需要将视频或音频文件的源显示在页面上。 语法:<EMBED>源文件</ EMBED>

43. Explain the Term Pseudo Classes. A Pseudo Class is used to enhance the effects of few HTML Elements including Hover Actions, Link Colors and few others. A Pseudo Class is similar to a normal class in HTML. The only difference is that it is not explicitly defined in the HTML Markup. A Pseudo Class is defined by listing the Selector followed by a Colon and a Class Element.

43.解释术语伪类。 伪类用于增强一些HTML元素的效果,包括悬停动作,链接颜色和其他一些元素。 伪类类似于HTML中的普通类。 唯一的区别是,它没有在HTML标记中明确定义。 通过列出选择器,冒号和类元素,来定义伪类。

44. Explain Z Index Functioning. When you use CSS for positioning Elements within an HTML document, there are possibilities of Overlapping. To avoid this overlapping, Z Index is used. It is basically an Integer and can contain Positive as well as Negative values. The default value is Zero.

44.解释Z索引的功能。 当您使用CSS在HTML文档中定位Elements时,可能会发生重叠。 为了避免这种重叠,使用Z索引。 它基本上是一个整数,可以包含正值和负值。 默认值为零。

45. Explain methods of CSS application to HTML documents. The following methods are used to include CSS styles in HTML documents: INLINE: This is the best method to use if you want to style to a single element within an HTML document. You just need to define the STYLE Tag by inserting it within a Paragraph tag such as <p> or <a>.

45.向CSS文档解释CSS应用程序的方法。 下列方法用于在HTML文档中包括CSS样式: INLINE:如果要对HTML文档中的单个元素进行样式设置,这是最佳的使用方法。 您只需要通过将STYLE标签插入诸如<p>或<a>之类的Paragraph标签中来定义它即可。

INTERNAL: This is accomplished by defining the HEAD of an HTML document by wrapping attributes within a STYLE tag.

内部:这是通过将属性包装在STYLE标记内来定义HTML文档的HEAD来实现的。

EXTERNAL: This is done by making a separate .CSS file and including the LINK of it within the HTML document. This can increase the Page Load Time.

外部:这是通过制作一个单独的.CSS文件并将其链接包含在HTML文档中来完成的。 这会增加页面加载时间。

46. Enlist Disadvantages of External Style Sheets: 1. It requires more data to download to import style information for each HTML document from a relative .CSS file. 2. Rendering an HTML document is not possible if the Style Sheet is not loaded properly. 3. For a small quantity of Style Definitions within a Single Page, it is not recommended to use an external CSS file.

46.克服外部样式表的缺点: 1.从相对的.CSS文件下载每个HTML文档的样式信息需要下载更多数据。 2.如果未正确加载样式表,则无法呈现HTML文档。 3.对于单个页面中的少量样式定义,不建议使用外部CSS文件。

47. Explain Float Property in Cascading Style Sheet? Suppose you need to move an Image to the Left or Right of an HTML Page along with its Caption Text or any Text that iis wrapped around it, you should make use of Float property.

47.在层叠样式表中解释浮动属性? 假设您需要将图像及其标题文本或环绕其的任何文本移至HTML页面的左侧或右侧,则应使用Float属性。

48. What is CSS Selector? CSS Selector is an equivalent alternative for HTML Element. It acts as a String that identifies the Elements to which a declaration will be applied. It can also be a set of declarations. A Selector can be thought of as a Link between HTML document and the Style Sheet.

48.什么是CSS选择器? CSS选择器是HTML元素的等效替代品。 它充当一个字符串,用于标识声明将要应用到的元素。 它也可以是一组声明。 选择器可视为HTML文档和样式表之间的链接。

49. Explain Image Sprites in CSS. When multiple images or a set of images is combined into a single image, it is known as an Image Sprite. It is better to use Sprite Images as loading every image on a Web page takes time and this reduces the page load time.

49.用CSS解释图像精灵。 当多个图像或一组图像组合成一个图像时,称为图像精灵。 最好使用Sprite Images,因为加载网页上的每个图像都需要时间,这可以减少页面加载时间。

50. Enlist the Merits of Embedded Style Sheets. 1. No extra download from external .css is required thereby reducing page load time and increased speed. 2. It is therefore possible to create Multiple Tags within a single HTML document. 3. Styles can implemented using grouping methods and also with Selectors.

50.发挥嵌入式样式表的优点。 1.无需从外部.css进行额外下载,从而减少了页面加载时间并提高了速度。 2.因此,可以在单个HTML文档中创建多个标签。 3.样式可以使用分组方法以及选择器来实现。

51. Explain the difference between a Class and an ID Selector? A Class can be linked to number of HTML elements whereas an ID Selector can be linked to only one occurrence of an element in a single HTML document.

51.解释类和ID选择器之间的区别吗? 一个类可以链接到许多HTML元素,而ID选择器只能链接到一个HTML文档中一次出现的元素。

52. Explain Logical and Physical Tags. Logical Tags is an old concept in HTML and they are mainly for Content appearance. With the advancement in Physical Tags, Logical tags have now taken a back step. Physical Tags are used extensively for presentational mark-up features and are better for appearance in an HTML document.

52.解释逻辑和物理标签。 逻辑标签是HTML中的一个古老概念,主要用于内容外观。 随着物理标签的发展,逻辑标签现在又往后迈了一步。 物理标记广泛用于表示性标记功能,并且在HTML文档中具有更好的外观。

So this was the list of some important HTML interview questions and answers. If you found any information incorrect or missing in above list then please mention it by commenting below.

因此,这是一些重要HTML面试问题和解答的列表。 如果您在上面的列表中发现任何不正确或缺失的信息,请在下面的评论中提及。

翻译自: https://www.thecrazyprogrammer.com/2015/10/html-interview-questions-and-answers.html

html面试常问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值