1.How do I create frames? What is a frameset?
Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple documents can be displayed in a single window, each within its own frame. Graphical browsers allow these frames to be scrolled independently of each other, and links can update the document displayed in one frame without affecting the others.You can’t just “add frames” to an existing document. Rather, you must create a frameset document that defines a particular combination of frames, and then display your content documents inside those frames. The frameset document should also include alternative non-framed content in a NOFRAMES element.The HTML 4 frames model has significant design flaws that cause usability problems for web users. Frames should be used only with great care.
2.How can I include comments in HTML?
Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don’t support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:
An HTML comment begins with “<!–”, ends with “–>”, and does not contain “–” or “>” anywhere in the comment.
The following are examples of HTML comments:
* <!– This is a comment. –>
* <!– This is another comment,
and it continues onto a second line. –>
* <!—->
Do not put comments inside tags (i.e., between “<” and “>”) in HTML markup.
3.What is a Hypertext link?
A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link’s destination.
4.How comfortable are you with writing HTML entirely by hand?
Very. I don’t usually use WYSIWYG. The only occasions when I do use Dreamweaver are when I want to draw something to see what it looks like, and then I’ll usually either take that design and hand-modify it or build it all over again from scratch in code. I have actually written my own desktop HTML IDE for Windows (it’s called Less Than Slash) with the intention of deploying it for use in web development training. If has built-in reference features, and will autocomplete code by parsing the DTD you specify in the file. That is to say, the program doesn’t know anything about HTML until after it parses the HTML DTD you specified. This should give you some idea of my skill level with HTML.
5.What is everyone using to write HTML?
Everyone has a different preference for which tool works best for them. Keep in mind that typically the less HTML the tool requires you to know, the worse the output of the HTML. In other words, you can always do it better by hand if you take the time to learn a little HTML.
6.What is a DOCTYPE? Which one do I use?
According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Originally, the DOCTYPE declaration was used only by SGML-based tools like HTML validators, which needed to determine which version of HTML a document used (or claimed to use).
Today, many browsers use the document’s DOCTYPE declaration to determine whether to use a stricter, more standards-oriented layout mode, or to use a “quirks” layout mode that attempts to emulate older, buggy browsers.
7.What is HTML?
HTML ( H yper T ext M arkup L anguage) is the language used to write Web pages. You are looking at a Web page right now.
You can view HTML pages in two ways:
* One view is their appearance on a Web browser, just like this page — colors, different text sizes, graphics.
* The other view is called “HTML Code” — this is the code that tells the browser what to do.
8.What is a tag?
In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons — to change the appearance of text, to show a graphic, or to make a link to another page.
9.What is the simplest HTML page?
HTML Code:
<HTML>
<HEAD>
<TITLE>This is my page title! </TITLE>
</HEAD>
<BODY>
This is my message to the world!
</BODY>
</HTML>
Browser Display:
This is my message to the world!
10.When I try to upload my site, all my images are X’s. How do I get them to load correctly?
They are a few reasons that this could happen. The most common are:
1. You’re attempting to use a .bmp or .tif or other non-supported file format. You can only use .gif and .jpg on the web. You must convert files that are not .gif or .jpg into a .gif or .jpg with your image/graphics program.
2. You’ve forgotten to upload the graphic files. Double-Check.
3. You’ve incorrectly linked to the images. When you are starting out, try just using the file name in the <img> tag. If you have cat.jpg, use
img src=”cat.jpg”>.
4. Image file names are case-sensitive. If your file is called CaT.JpG, you cannot type cat.jpg, you must type CaT.JpG exactly in the src.
5. If all of the above fail, re-upload the image in BINARY mode. You may have accidentally uploaded the image in ASCII mode.
11.Is there a site that shows which tags work on which browsers?
There have been several attempts to do this, but I’m not aware of any really good source of comparisons between the browsers. The trouble is that there are many different versions of each browser, and many different tags. All current browsers should support the tags in the official HTML 3.2 specification, but the major ones also support nonstandard tags and sometimes have slightly different implementations. One place that has fairly good compatibility info is Browsercaps.
12.Why does the browser show my plain HTML source?
If Microsoft Internet Explorer displays your document normally, but other browsers display your plain HTML source, then most likely your web server is sending the document with the MIME type “text/plain”. Your web server needs to be configured to send that filename with the MIME type “text/html”. Often, using the filename extension “.html” or “.htm” is all that is necessary. If you are seeing this behavior while viewing your HTML documents on your local Windows filesystem, then your text editor may have added a “.txt” filename extension automatically. You should rename filename.html.txt to filename.html so that Windows will treat the file as an HTML document.
13.How can I display an image on my page?
Use an IMG element. The SRC attribute specifies the location of the image. The ALT attribute provides alternate text for those not loading images. For example:
<img src=”logo.gif” alt=”ACME Products”>
14.Why do my links open new windows rather than update an existing frame?
If there is no existing frame with the name you used for the TARGET attribute, then a new browser window will be opened, and this window will be assigned the name you used. Furthermore, TARGET=”_blank” will open a new, unnamed browser window.In HTML 4, the TARGET attribute value is case-insensitive, so that abc and ABC both refer to the same frame/window, and _top and _TOP both have the same meaning. However, most browsers treat the TARGET attribute value as case-sensitive and do not recognize ABC as being the same as abc, or _TOP as having the special meaning of _top.
Also, some browsers include a security feature that prevents documents from being hijacked by third-party framesets. In these browsers, if a document’s link targets a frame defined by a frameset document that is located on a different server than the document itself, then the link opens in a new window instead.
15.How do I get out of a frameset?
If you are the author, this is easy. You only have to add the TARGET attribute to the link that takes readers to the intended ‘outside’ document. Give it the value of _top.In many current browsers, it is not possible to display a frame in the full browser window, at least not very easily. The reader would need to copy the URL of the desired frame and then request that URL manually.I would recommend that authors who want to offer readers this option add a link to the document itself in the document, with the TARGET attribute set to _top so the document displays in the full window if the link is followed.
16.How do I make a frame with a vertical scrollbar but without a horizontal scrollbar?
The only way to have a frame with a vertical scrollbar but without a horizontal scrollbar is to define the frame with SCROLLING=”auto” (the default), and to have content that does not require horizontal scrolling. There is no way to specify that a frame should have one scrollbar but not the other. Using SCROLLING=”yes” will force scrollbars in both directions (even when they aren’t needed), and using SCROLLING=”no” will inhibit all scrollbars (even when scrolling is necessary to access the frame’s content). There are no other values for the SCROLLING attribute.
17.Are there any problems with using frames?
The fundamental problem with the design of frames is that framesets create states in the browser that are not addressable. Once any of the frames within a frameset changes from its default content, there is no longer a way to address the current state of the frameset. It is difficult to bookmark – and impossible to link or index – such a frameset state. It is impossible to reference such a frameset state in other media. When the sub-documents of such a frameset state are accessed directly, they appear without the context of the surrounding frameset. Basic browser functions (e.g., printing, moving forwards/backwards in the browser’s history) behave differently with framesets. Also, browsers cannot identify which frame should have focus, which affects scrolling, searching, and the use of keyboard shortcuts in general.
Furthermore, frames focus on layout rather than on information structure, and many authors of framed sites neglect to provide useful alternative content in the NOFRAMES element. Both of these factors cause accessibility problems for browsers that differ significantly from the author’s expectations and for search engines.
17.Do search engines dislike frames?
Search engines can link directly to framed content documents, but they cannot link to the combinations of frames for which those content documents were designed. This is the result of a fundamental flaw in the design of frames.
Search engines try to provide their users with links to useful documents. Many framed content documents are difficult to use when accessed directly (outside their intended frameset), so there is little benefit if search engines offer links to them. Therefore, many search engines ignore frames completely and go about indexing more useful (non-framed) documents.
18.How do I keep people from stealing my source code and/or images?
Because copies of your HTML files and images are stored in cache, it is impossible to prevent someone from being able to save them onto their hard drive. If you are concerned about your images, you may wish to embed a watermark with your information into the image. Consult your image editing program’s help file for more details.
19.How do you create tabs or indents in Web pages?
There was a tag proposed for HTML 3.0, but it was never adopted by any major browser and the draft specification has now expired. You can simulate a tab or indent in various ways, including using a transparent GIF, but none are quite as satisfactory or widely supported as an official tag would be.
20.How do I create a link?
Use an anchor element. The HREF attribute specifies the URL of the document that you want to link to. The following example links the text “Web Authoring FAQ” to <URL:http://www.htmlhelp.com/faq/html/>:
<A HREF=”http://www.yoursite.com/faq/html/”>Web Authoring FAQ</A>
21.How do I create a link that opens a new window?
<a target=”_blank” href=…> opens a new, unnamed window.
<a target=”example” href=…> opens a new window named “example”, provided that a window or frame by that name does not already exist.
Note that the TARGET attribute is not part of HTML 4 Strict. In HTML 4 Strict, new windows can be created only with JavaScript. links that open new windows can be annoying to your readers if there is not a good reason for them.
22.How do I let people download a file from my page?
Once the file is uploaded to the server, you need only use an anchor reference tag to link to it. An example would be:
<a href=”../files/foo.zip”>Download Foo Now! (100kb ZIP)</a>
23.How do I create a button which acts like a link?
This is best done with a small form:
<FORM ACTION=”[URL]” METHOD=GET>
<INPUT TYPE=submit VALUE=”Text on button”>
</FORM>
If you want to line up buttons next to each other, you will have to put them in a one-row table, with each button in a separate cell.
Note that search engines might not find the target document unless there is a normal link somewhere else on the page.
A go-to-other-page button can also be coded in JavaScript, but the above is standard HTML and works for more readers.
24.How can I make a form with custom buttons?
Rather than a normal submit button (<input type=”submit” …>), you can use the image input type (<input type=”image” …>). The image input type specifies a graphical submit button that functions like a server-side image map.
Unlike normal submit buttons (which return a name=value pair), the image input type returns the x-y coordinates of the location where the user clicked on the image. The browser returns the x-y coordinates as name.x=000 and name.y=000 pairs.
For compatability with various non-graphical browsing environments, the VALUE and ALT attributes should be set to the same value as the NAME attribute. For example:
<input type=”image” name=”Send” alt=”Send” value=”Send” src=”send-button.gif”>
For the reset button, one could use <button type=”reset” …>, JavaScript, and/or style sheets, although none of these mechanisms work universally.
25.How do I specify page breaks in HTML?
There is no way in standard HTML to specify where page breaks will occur when printing a page. HTML was designed to be a device-independent structural definition language, and page breaks depend on things like the fonts and paper size that the person viewing the page is using.
26.How do I remove the border around frames?
Removing the border around frames involves both not drawing the frame borders and eliminating the space between the frames. The most widely supported way to display borderless frames is <FRAMESET … BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>.
Note that these attributes are proprietary and not part of the HTML 4.01 specifications. (HTML 4.01 does define the FRAMEBORDER attribute for the FRAME element, but not for the FRAMESET element.) Also, removing the border around a frame makes it difficult to resize it, as this border is also used in most GUIs to change the size of the frame.
27.How can I specify colors?
If you want others to view your web page with specific colors, the most appropriate way is to suggest the colors with a style sheet. Cascading Style Sheets use the color and background-color properties to specify text and background colors. To avoid conflicts between the reader’s default colors and those suggested by the author, these two properties should always be used together.
With HTML, you can suggest colors with the TEXT, LINK, VLINK (visited link), ALINK (active link), and BGCOLOR (background color) attributes of the BODY element.Note that these attributes are deprecated by HTML 4. Also, if one of these attributes is used, then all of them should be used to ensure that the reader’s default colors do not interfere with those suggested by the author. Here is an example:
<body bgcolor=”#ffffff” text=”#000000″ link=”#0000ff” vlink=”#800080″ alink=”#000080″>
Authors should not rely on the specified colors since browsers allow their users to override document-specified colors.
28.How do I get form data emailed to me?
The only reliable mechanism for processing form submissions is with a server-side (e.g., CGI) program. To send form data to yourself via email, you should use a server-side program that processes the form submission and sends the data to your email address.
Some web service providers make standard form-to-email programs available to their customers. Check with your service provider for details.
If you can install CGI programs on your own server, see the answer to the previous question for a list of useful resources.
If you can’t run CGI programs on your own server, you can use a remotely hosted form-to-email services. Note that the provider of a remotely hosted service will have access to any data submitted via the service.
Forms that use action=”mailto:…” are unreliable. According to the HTML specifications, form behavior is explicitly undefined for mailto URIs (or anything else other than HTTP URIs). They may work one way with one software configuration, may work other ways in other software configurations, and may fail completely in other software configurations.
29.Can I prevent a form from being submitted again?
No. The server-side (e.g., CGI) program that processes the form submission must handle duplicate submissions gracefully.
You could generate the form with a server-side (e.g., CGI) program that adds a hidden field with a unique session ID. Then the server-side program that processes the form submission can check the session ID against a list of previously used session IDs. If the session ID has already been used, then an appropriate action can be taken (e.g., reject the submission, or update the previously submitted data).
Ultimately, your server-side program must be smart enough to handle resubmitted data. But you can avoid getting resubmitted data by not expiring the confirmation page from form submissions. Since you want to expire pages quickly when they have transient data, you might want to avoid putting transient data on the confirmation page. You could provide a link to a database query that returns transient data though.
30.How can I allow file uploads to my web site?
These things are necessary for Web-based uploads:
* An HTTP server that accepts uploads.
* Access to the /cgi-bin/ to put the receiving script. Prewritten CGI file-upload scripts are available.
* A form implemented something like this:
<form method=”post” enctype=”multipart/form-data” action=”fup.cgi”>
File to upload: <input type=file name=upfile><br>
Notes about the file: <input type=text name=note><br>
<input type=submit value=Press> to upload the file!
</form>
Not all browsers support form-based file upload, so try to give alternatives where possible.
The Perl CGI.pm module supports file upload. The most recent versions of the cgi-lib.pl library also support file upload. Also, if you need to do file upload in conjunction with form-to-email, the Perl package MIME::Lite handles email attachments.
31.How can I require that fields be filled in, or filled in correctly?
Have the server-side (e.g., CGI) program that processes the form submission send an error message if the field is not filled in properly. Ideally, this error message should include a copy of the original form with the original (incomplete or incorrect) data filled in as the default values for the form fields. The Perl CGI.pm module provides helpful mechanisms for returning partially completed forms to the user.
In addition, you could use JavaScript in the form’s ONSUBMIT attribute to check the form data. If JavaScript support is enabled, then the ONSUBMIT event handler can inform the user of the problem and return false to prevent the form from being submitted.
Note that the server-side program should not rely upon the checking done by the client-side script.
32.How do I change the title of a framed document?
The title displayed is the title of the frameset document rather than the titles of any of the pages within frames. To change the title displayed, link to a new frameset document using TARGET=”_top” (replacing the entire frameset).
33.How do I link an image to something?
Just use the image as the link content, like this:
<a href=…><img src=… alt=…></a>
34.How do I eliminate the blue border around linked images?
In your HTML, you can specify the BORDER attribute for the image:
<a href=…><img src=… alt=… border=”0″></a>
However, note that removing the border that indicates an image is a link makes it harder for users to distinguish quickly and easily which images on a web page are clickable.
35.How do I eliminate the space around/between my images?
If your images are inside a table, be sure to set the BORDER, CELLSPACING, and CELLPADDING attributes to 0.
Extra space between images is often created by whitespace around the <IMG> tag in the markup. It is safe to use newlines inside a tag (between attributes), but not between two tags. For example, replace this:
<td …>
<img src=… alt=…>
<img src=… alt=…>
</td>
with this:
<td …><img src=… alt=…><img src=… alt=…></td>
According to the latest specifications, the two should be equivalent. However, common browsers do not comply with the specifications in this situation.
36.How can I show HTML examples without them being interpreted as part of my document?
Within the HTML example, first replace the “&” character with “&” everywhere it occurs. Then replace the “<” character with “<” and the “>” character with “>” in the same way.Note that it may be appropriate to use the CODE and/or PRE elements when displaying HTML examples.
37. Differentiate HTML and HTML Extension?
The extension which is used for saving HTML file is .html or .htm. In our example .htm is used. It is a past habit when only three letters are allowed for the software in file extensions. In the new versions of software, we can perfectly use .html extension.
38. Define tag?
Browser is told what to do by the tags in the HTML language. While writing an HTML page, the tags are entered for many reasons such as to show graphic, to change the text appearance or to link to other page.
39. Define HTML tag?
In the HTML language, HTML tag is a syntactical construct that abbreviates particular instruction to be executed when the web browser loads HTML script. It is like a function in C++, method in Java, routine in FORTRAN or a procedure in Pascal.
40. Define Hypertext link?
The special tag linking one page to other resource or a page is known as hypertext link. If you click the link then the browser jumps to the destination link.
41. Differentiate HTML form methods GET and POST?
Which method is used by the client to send information to web server is specified by the method parameter.
• POST – post_args
• GET – httpargs
42. How an index document is defined?
Many times we use index.htm document as it is standard for host-server to look and deploy document. It is the default document which is displayed on the web.
43. How a HEAD is defined in HTML?
In HTML, HEAD is placed before body and it is used to show general information or unordered collection about HTML document. In HTML, it is the first tag which helps to give title for the page.
44. How a body is defined in HTML?
In HTML, body specifies all the contents in the document and it contains colors, images, text, graphics, etc.
45. How to keep sound for older version internet explorer?
is the technique used for older versions of internet explorers.
46. Can HTML is used in box?
Yes. Any HTML tag that is supported by the browser works in the box.
47. Define polymorphism?
In object oriented programming polymorphism is nothing but objects ability to take form objects of different classes.
48. Differentiate component and container?
Component is an object like a scroll bar or button that is visually presented on screen window whereas a container is window-like component which has different components.
Each component has unique container that contains it directly.
49. Differentiate constructor and method?
The member function of a class which is used for creating objects of that particular class is known as a constructor. It has the same name of a class without any return type. New operator is used to invoke it.
An ordinary member function of a class is known as a method. It has a return type with its own name. Dot operator is used to invoke it.
50. What are the different graphic types?
In general, there are two different types of graphics, they are:
• Raster Graphics – pixels
• Vector Graphics – lines and curves
51. Define Gradient and how to apply it?
Mixing two or more colors are known as Gradient.
52. Define DHTML?
The combination of HTML, JavaScript, XHTML, CSS and Jquery is known as DHTML.
It is used for creating interactive and dynamic web pages.
53. What is the difference between HTML and DHTML?
HTML:
• The full form of HTML is hyper text markup language.
• HTML is a markup language but not programming.
• It does not allow any features.
• HTML documents describe web pages which include HTML tags and plain text.
DHTML:
• The full form of DHTML is dynamic hyper text markup language.
• Few extra features are permitted by DHTML.
• DHTML sites are going fast on the client based technologies.
• The art of combining HTML, HTML DOM and JavaScript is known as DHTML.
54. Define XML?
• The abbreviation of XML is extensible markup language.
• To store and transport data, XML is used.
55. Define CSS?
The abbreviation of CSS is Cascading Style Sheets. To solve problem, styles are added to HTML 4.0 and these styles define how the HTML elements are showed. Lot of work is saved by External Style Sheets and is stored in CSS files.
56. Define HTML5?
The new standard for HTML, HTML DOM and XHTML is HTML5.
HTML5 is work in progress and the modern browsers have support to HTML5.
57. Does HTML is case sensitive?
No, it is not case sensitive.
58. What are the advantages of HTML?
The main advantages of HTML are as follows:
• HTML is the widely used language.
• Almost all the browsers support HTML.
• HTML is very simple and usage, learning is easy.
• You need not purchase additional software as it is in windows by default.
• The syntax of HTML and XML is similar and XML is widely used for storing data.
• Even the beginners feel easy to code the program.
59. What are the disadvantages of HTML?
• HTML is used to develop plain and static pages. HTML suits perfectly when dynamic pages are required.
• A lengthy code is written to create a simple HTML page.
• The security features are not good in HTML.
60.What are tags?
Content is placed in between HTML tags 0in 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. For example:
[xml]
<strong>sample</strong>
[/xml]
61.Do all HTML tags come in pair?
No, there are single HTML tags that does not need a closing tag. Examples are the <img> tag and <br> tags.
62.What are some of the common lists that can be used when designing a page?
You can insert any or a combination of the following list types:
- ordered list
- unordered list
- definition list
- menu list
- directory list
Each of this list types makes use of a different tag set to compose
63.How do you insert a comment in html?
html interview Questions
Comments in html begins with “<!–”nd ends with “–>”. For example:
[xml]
<!– A SAMPLE COMMENT –>
[/xml]
64.Do all character entities display properly on all systems?
No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.
65.What is image map?
Image map lets you link to many different web pages using a single image. You can define shapes in images that you want to make part of an image mapping.
66. What is the advantage of collapsing white space?
White spaces are blank sequence of space characters, which is actually treated as a single space character in html. Because the browser collapses multiple space into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the html code into a much more readable format.
67.Can attribute values be set to anything or are there specific values that they accept?
Some attribute values can be set to only predefined values. Other attributes can accept any numerical value that represents the number of pixels for a size.
68.How do you insert a copyright symbol on a browser page?
To insert the copyright symbol, you need to type © or & #169; in an HTML file.
69.How do you create links to sections within the same page?
Links can be created using the <a> tag, with referencing through the use of the number (#) symbol. For example, you can have one line as <a href=”#topmost”>BACK TO TOP</a>, which would result in the words “BACK TO TOP” appearing on the webpage and links to a bookmark named topmost. You then create a separate tag command like <a name=”topmost”> somewhere on the top of the same webpage so that the user will be linked to that spot when he clicked on “BACK TO TOP”.
70.Is there any way to keep list elements straight in an html file?
By using indents, you can keep the list elements straight. If you indent each subnested list in further than the parent list that contains it, you can at a glance determine the various lists and the elements that it contains.
71.If you see a web address on a magazine, to which web page does it point?
Every web page 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 magazines typically points this top-most page. From this top level page, you can access all other pages within the web site.
72.What is the use of using alternative text in image mapping?
When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.
73.Do older html files work on newer browsers?
Yes, older html files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.
74.Does a hyperlink apply to text only?
No, hyperlinks can be used on text as well as images. That means you can convert an image into a link that will allow user to link to another page when clicked. Just surround the image within the <a href=” “>…</a> tag combinations.
75.If the user’s operating system does not support the needed character, how can the symbol be represented?
In cases wherein their operating system does not support a particular character, it is still possible to display that character by showing it as an image instead.
76.How do you change the number type in the middle of a list?
The <li> tag includes two attributes – type and value. The type attribute can be used to change the numbering type for any list item. The value attribute can change the number index.
77.What are style sheets?
Style sheets enable you to build consistent, transportable, and well-defined style 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.
78.What bullet types are available?
With ordered lists, you can select to use a number of different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.
79.How do you create multicolored text in a webpage?
To create text with different colors, use the <font color=”color”>…</font> tags for every character that you want to apply a color. You can use this tag combination as many times as needed, surrounding a single character or an entire word.
80. Why are there both numerical and named character entity values?
The numerical values are taken from the ASCII values for the various characters, but these can be difficult to remember. Because of this, named character entity values were created to make it easier for web page designers to use.
81.What will happen if you overlap sets of tags?
If two sets of html 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.
82.What are 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.
83.What if there is no text between the 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 like the <img> tag, do not require any text between them.
84.Is it possible to set specific colors for table borders?
You can specify a 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.
85.How do you create a link that will connect to another web page when clicked?
To create hyperlinks, or links that connect to another web page, use the href tag. The general format for this is: <a href=”site”>text</a>
Replace “site” with the actual page url that is supposed to be linked to when the text is clicked.
86.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 style sheets.
87.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 a single web page.
88.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.
89.Can you change the color of bullets?
The bullet color is always the same as that of the first character in the list litem. 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.
90.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.
91.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> tag 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.
92.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.
93.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.
94.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 to send email, use the mailto command within the href tag. The format is as follows:
[xml]
<A HREF=”mailto:youremailaddress”>text to be clicked</A>
[/xml]
95.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 the <p> tag and <blockquote> tag, also separate sections of text.
96.Are there instances where text will appear outside of the browser?
By default, the text is wrapped to appear within the browser window. However, if the text is part of a table cell with a defined width, the text could extend beyond the browser window.
97.How are active links different from normal links?
The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed 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.
98.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 symbol.
99. 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 two zeroes.
100.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 style takes priority over embedded style sheets, which takes priority over external style sheets.
101.Can several selectors with class names be grouped together?
You can define several selectors with the same style definition by separating them with commas. This same technique also works for selectors with class names.
102.What happens if you open the external CSS file in a browser?
If you try to open the external CSS file in a browser, the browser cannot open the file, because 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.
103.How do you make a picture into a background image of a web page?
To do this, place a tag code after the </head> tag as follows:
[xml]
<body background = “image.gif”>
[/xml]
Replace image.gif with the name of your image file. This will take the picture and make it the background image of your web page.
104.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 like a paragraph, the property will be ignored and have no effect on the paragraph.
105.When is it appropriate to use frames?
Frames can make navigating a site much 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.
106.What happens if the number of values in the rows or cols attribute doesn’t add up to 100 percent?
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.
No comments:
Post a Comment