HTML Interview questions

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

How do you insert a comment in HTML?

<!-- Comment -->

Write a HTML table tag sequence that outputs the following: 50 pcs 100 500 10 pcs 5 50

<table> <tr> <td>50 pcs</td> <td>100</td> <td>500</td> </tr> <tr> <td>10 pcs</td> <td>5</td> <td>50</td> </tr> </table>

What is a marquee?

A marquee allows you to put a scrolling text in a web page. To do this place whatever text you want to appear scrolling within the <marquee> and </marquee> tags.

What is the advantage to grouping several check boxes together?

Although check boxes do not affect one another, grouping check boxes together helps organize them. Check box buttons can have their own name and do not need to belong to a group. A single web page can have many different groups of check boxes.

Do <th> tags always need to come at the start of a row or column?

Any <tr> tag can be changed to a <th> tag. This causes the text contained within the <th> to be displayed as bold in the browser. Although <th> tags are mainly used for headings, they do not need to be used exclusively for headings.

What are the applets?

Applets are small programs that can be embedded within web pages to perform some specific functionality such as computations, animations, and information processing. Applets are written using the Java language.

Are there instances where text will appear outside of the browser?

By default the text is wrapped to appear within the browser window. If the text is part of a table cell with a defined width, the text could extend beyond the browser window.

What are some of the common lists that can be used when designing a page?

Common lists: Ordered Unordered Definition Menu Directory Each of this list type make use of a different tag set.

What are tags?

Content is placed in between HTML tags in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol(>). A slash symbol is also used as a closing tag. IE: <strong>sample</strong>

What is the relationship between the border and rule attributes?

Default cell borders, with a thickness of 1 pixel, are automatically added between cells if the border attribute is set to a nonzero value. Likewise, if the border attribute is not included, a default 1 pixel border appears if the rules attribute is added to the <table> tag.

If you see a web address on a magazine, to which webpages does it point?

Every webpage on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within a magazine typically points to this top-most page. From this top level page you can navigate through the rest of the pages.

When is it appropriate to use frames?

Frames can make navigating a site easier. If the main links to the site are located in a frame that appears at the top or along the edge of the browser, the content for those links can be displayed in the remainder of the browser window.

What is HTML?

HTML is short for Hyper text Markup Language and is the language of the World Wide Web. It is the standard text formatting language used for creating web and displaying web pages on the Web. HTML documents are made up of two things: The content and the Tags that format it for proper display.

What is the hierarchy that is being followed when it comes to style sheets?

If a single selector includes three different style definitions, the definition that is closest to the actual tag takes precedence. Inline styles take priority over embedded style sheets, which take priority over external style sheets.

What happens if the list-style-type property is used on a non-list element like a paragraph?

If the list-style-type property is used on a non-list element then they property is ignored and will have no effect on the paragraph.

If the users operating system does not support the needed character, how can the symbol be represented?

If the users system does not support a particular character, it is still possible to display it as an image instead.

What if there is no text between tags or if a text was omitted by mistake? Will it affect the display of the HTML file?

If there is no text between the tags then there is nothing to format so no formatting will appear. Some tags, especially tags without a closing tag, do not require any text at all.

What will happen if you overlap sets of tags?

If two sets of tags are overlapped only the first tag will be recognized. You will recognize this problem when the text does not display properly on the browser screen.

What happens if you open the external CSS file in a browser?

If you open the external CSS file in a browser, it will NOT open. The file has a different extension. The only way to use an external CSS file is to reference it using <link/> tag within another HTML document.

What is Image Map?

Image Map lets you link to many different web pages using a single image. You can define shapes in the images that you want to make part of the image map.

Can I specify fractional weight values such as 670 or 973 for font weight?

Implementation largely depends on the browser, but the standard does not support fractional weight values. Acceptable values must end with 2 zeros.

How do you create links to sections within the same page?

Links can be created using the <a> tag with a reference through using the number (#) symbol. For example you can have one line as <a href="#topmost">BACK TO TOP</a> which would result in the worlds "back to top" appearing on the webpage and links to a bookmark named topmost. You can then create a separate tage command like <a name="topmost"> somewhere on the top of the same page sot hat the user will be linked to that spot when they click "back to top."

Do all character entities display properly on all systems?

No, there are some characters entities that cannot be displayed when the operating system browser is running on does not support the characters. When this happens these characters are displayed as boxes.

Does a hyperlink apply to text only?

No. A hyperlink can be used on text as well as images to link to another page when clicked. Just surround the image within the <a href= " "> </a> tag.

Can a single text link point to two different web pages?

No. The <a> tag can accept only a single href attribute and it can point to only one web page.

Are <br> tags the only way to separate sections of text?

No. The <br> tag is only one way to separate lines of text. Other tags like <p> or <blockquote> also separate sections of text.

Do all HTML tags come in pairs?

No. There are some HTML tags that do not need a closing tag like <img> and <br>

How do you make a picture the background image of a web page?

Place the tag code after the </head> tag: <body background = "image.gif">

Can attribute values be set to anything or are their specific values that they accept?

Some attribute values can be set to only predefined values while others can accept any numerical value that represents a number of pixels for sizes.

Do style sheets limit the number of new style definitions that can be included within the brackets?

Style sheets do not limit the number of style definitions that can be included within the brackets for a given selector. Every new style definition, however ,must be separated from the others by a semicolon.

What are style sheets?

Style sheets enable you to build consistent, transportable, and well defined styled templates. These templates can be linked to several different web pages making it easy to maintain and change the look and feel of all the web pages within a site.

What other ways can be used to align images and wrap text?

Tables can be used to position text and images. Another useful way to wrap text around an image is to use the style sheet.

How do you change the number type in the middle of a list?

The <li> includes two attributes type and Value: Type - is used to change the number type for any list. Value - is used to change the number index.

What happens if the number of values in the rows or cols attribute doesn't add up to 100%?

The browser sizes the frames relative to the total sum of the values. If the cols attribute is set to 100%, 200% the browser displays two vertical frames with the second being twice as big as the first.

Can you change the color of the bullets?

The bullet color is always the same as the first character in the list item. If you surround the <li> and the first character with a set of <font> tags with the color attribute set, the bullet color and the first character will be a different color from the text.

How are active links different then normal links?

The default color for normal links and active links is blue. Some browsers recognize an active link when the mouse cursor is place over that link. Others recognize active links when the link has the focus. Those that don't have a mouse cursor over that link is considered a normal link.

What are the limits of the text field size?

The default size for a text field is around 13 characters, but if you include the size attribute you can set the size value to be as low as 1. The maximum size value will be determined by the browser width. If the size attribute is set to 0 the size will be set to the default size of 13 characters.

What is the difference between the directory and menu lists and the unordered list?

The key differences is that the directory and menu lists do not include attributes for changing the bullet style.

Why are both numerical and named character entity values?

The numerical values are taken from ASCII values for the various characters, but these can be difficult to remember so named character entity values were created to make it easier for web page designers to use.

How do you create a text on a webpage that will allow you to send an email when clicked?

To change a text into a clickable link that sends e-mails use the maito command within the href tag. <a href="mailto:[email protected]">Clickable link</a>

How do you create a link that will connect to another web page when clicked?

To create a hyperlink to connects to another web page you use the href tag. The general format is <a href="url">text</a>.

How do you create multicolored text in a webpage?

To create multicolored text you can use the <font color="color"> </font> tags for every character that you want to apply color to. You can use this tag combination as many times as needed. Surrounding a single character or entire words.

How do you insert a copyright symbol on a browser page?

To insert the copyright symbol you need to type &copy; or &#169 in the HTML file

What is the use of using alternative text in imaging mapping?

When you use image maps it can be easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put descriptive text on each hotspot link.

What is the advantage of collapsing white space?

White spaces are blank sequences of space characters, which is actually treated as a single space character in HTML. Because the browser collapses multiple spaces into a single space you can indent lines of text without worrying about multiple spaces. This enables you to organize the HTML code into much readable format.

What bullet types are available?

With ordered lists you can select including alphabetical and roman numeral. The type attribute for unordered lists can be set to disc, square or circle.

Is there any way to keep list elements strait in an HTML file?

Yes. By using indents you can keep the list elements straight. If you indent each subnested list in further then the parent list that contains it you can, at a glance, determine the various lists and the elements that it contains.

Do older html files work on new browsers?

Yes. Older HTML files are compliant to the HTML standard so most older files work on newer browsers, although some features may not work.

Is it possible to set specific colors for table borders?

Yes. You can specify border color using style sheets, but the colors for a table that does not use style sheets will be the same as the text color.

Can several selectors with class names be grouped together?

You can define several selectors with the same style definitions by separating them with commas. This technique also works for selectors with class names.


Ensembles d'études connexes

AS: Definitions and ways of measuring poverty

View Set

Accounting Chapter 6: Inventory and Cost of Goods Sold

View Set

Chemistry 1151- Final Exam Study Guide

View Set

Méthodes de recherche - Examen intra

View Set

Chapter 14 : Troubleshooting Windows

View Set