HTML Interview Questions - 4


 

1.What is Semantic HTML?
Semantic HTML means using HTML tags for their implied meaning, rather than just using (meaningless) div and span tags for absolutely everything. Why would you want to do this? Depending on the tag, the content in the tag can be interpreted in a certain way.
2. What is Document Type Definition?
Document Type Defination (DTD) specifies the syntax of a web page in SGML,It is used to specify rules that apply to the markup of the document of a particular type,including a set of element and entity declarations.
3. What is DIV in HTML?
DIV is same as span but it has an additional property of align in it with the help of which we can align the text within it,furhter if we want to palce our code anywhere in our page we use DIV tag and our code within it.
4. What is HEAD in HTML document?
The head of an HTML document is an unordered collection of information about the document. The HEAD contains general information, or meta-information, about the document. The head appears first in a document above the BODY.
5. What are the differences between cell spacing and cell padding?
Cell Padding: Cell padding is used for formatting purpose which is used to specify the space needed between the edges of the cells and also in the cell contents.
Cell Spacing: Cell spacing is one also used f formatting but there is a major difference between cell padding and cell spacing.
It is as follows: Cell padding is used to set extra space which is used to separate cell walls from their contents. But in contrast cell spacing is used to set space between cells.
6.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.
7.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.
8.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.
9.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.
10.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.
11.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.
12.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.
13.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.
14.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.
15.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.
16.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.
17.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.
18. How do I include one file in another?
Use server-side includes, if your server supports them. Ask your Webmaster if this is the case, and if so, what the exact syntax is for your server.
Since server-side includes make the document slower, they are not always desirable. If your documents only have a static footer, which doesn’t change every day, you might be better off by using an editor which can insert files in the current document, or a preprocessor. The C preprocessor can do this, but there are also several HTML-specific preprocessors available.
19. How do I get scrolling text in the status bar?
This is not an HTML question, it’s done with a Javascript. Check any page which has this feature, and copy the script from the source.
This script has two big problems. One, usually it uses the decrement operator (c–) at some ball. The “–” sequence in a comment actually closes it on some browsers, so your code may “leak” on those browsers. The same goes for “>”.
Second, keep in mind that many people consider this even worse than <BLINK>, and that it also suppresses the status information which normally appears there. It prevents people from knowing where a link goes to.
20. How do I hide my source?
You can’t. The source is necessary for the browser to display your document. You have to send the complete, unencrypted source to the browser. Even if a particular browser doesn’t have a “View source” option, there are many that do, and you can always retrieve the document by hand (using telnet) to get its source. Or check the browser’s cache.
You can of course put a few hundred empty lines above the actual source, then newbies who don’t see the scrollbars will think there is nothing there.
21. How can I make a custom rule, or a list with custom bullets?
There was a proposal in the now-expired HTML 3 draft to handle exactly this: just add SRC to the <HR> or <UL> tag, indicating where the image can be found. But until this is more widely supported, you have to use <IMG> for the rule, with a lot of “–” characters as ALT text for text browsers, and using a <DL> with only <DD> tags for each item. Make sure you use ALIGN for the image, which should go at the beginning of the item, of course. This isn’t as beautiful as a “real” list.
An alternative is using a two column table, with the bullets in the left column, and the text in the right. But this won’t work well on non-table supporting browsers.
22. How do I display the current date or time in my document?
With server-side includes. Ask your webmaster if this is supported, and what the exact syntax is for your server. But this will display the local time on the server, not for the client. And if the document is cached, the date will of course be incorrect after some time.
JavaScript can be used to display the local time for the client, but as most people already have one or more clocks on their screen, why display another one?
23. For what screen size should I write?
HTML does not depend on screen size. The text will be wrapped by the browser when the end of the screen is encountered. The only exception to this is when you use <PRE>-formatted text, which will only wrap at the line breaks you indicate. So make sure these lines are no longer than 70 characters, otherwise text mode users will see ugly line breaks on their terminals. And users of graphical browsers might have to scroll horizontally to see the rest, which is one of the most hated things to do when you read a document.
Of course, an image cannot be wrapped, so you have to be careful with that. It seems that 400 or 500 pixels is a reasonable width; anything above 600 will mean a certain percentage of users will have to scroll to see the rightmost bit. This percentage increases with your image width. Keep in mind that not everyone runs his browser at full screen!
24. How do I get my visitor’s e-mail addresses?
You can’t. Although each request for a document is usually logged with the name or address of the remote host, the actual username is almost never logged as well. This is mostly because of performance reasons, as it would require that the server uses the ident protocol to see who is on the other end. This takes time. And if a cache proxy is doing the request, you don’t get anything sensible.
In Netscape 2.0, it was possible to automatically submit a form with a mailto as action, using Javascript. This would send e-mail to the document’s owner, with the address the visitor configured in the From line. Of course, that can be “mickey.mouse@disney.com”. This is fixed in Netscape 2.01.
The most reliable way is to put up a form, asking the visitor to fill in his e-mail address. If you offer him something in return, he will most likely do it.
25. How do I do a pagebreak?
You don’t. HTML is not a page layout language. It’s up to the browser to decide where and how to insert page breaks when the document is being printed.
However, style sheets (not widely supported yet, although Microsoft’s Internet Explorer is beginning to use it) will include support to indicate preferred balls for page breaks, probably somewhat like the way LaTeX handles this.
26. How do I make a table which looks good on AOL and Prodigy?
The best way is probably to include a version in preformatted text. This can be seen by any browser, including Lynx.
If you absolutely must have a table, check out Alan Flavell’s document on tables for a good discussion.
27. How do I center a table?
The “correct” way of doing it is <TABLE ALIGN=CENTER>, but this doesn’t work in several popular browsers. Put <CENTER> around the entire table for these browsers.
This causes some problems with browser that do support CENTER but not tables, such as Lynx. In these browsers, the contents of the cells is now displayed centered, which is not what is intended. To avoid this, you can put the cell’s contents in <P ALIGN=left> or <DIV ALIGN=left> depending on the amount of text in the cell.
28. How do I make animated GIFs?
Ask on the comp.infosystems.www.authoring.images group.
29. Is there a way to get indexed better by the search engines?
Yes. Put these two statements in the <HEAD> part of your documents:
<META NAME=”keywords” CONTENT=”keyword keyword keyword keyword”>
<META NAME=”description” CONTENT=”description of your site”>
Both may contain up to 1022 characters. If a keyword is used more than 7 times the keywords tag will be ignored altogether. Also, you can’t put markup (other than entities) in the description or keywords list. Infoseek and Alta Vista are using this.
30. How do I redirect someone to my new page?
The most reliable way is to configure the server to send out a redirection instruction when the old URL is requested. Then the browser will automatically get the new URL. This is the fastest way to do this. You can of course also simply put up a small page with a text like “This page has moved to http://new.url/, please adjust your bookmarks”.
A Netscape-only solution, which doesn’t work on other browsers, and screws up the “back” button in Netscape, is
<META HTTP-EQUIV=”Refresh” CONTENT=”x; URL=new.URL”>
which will load the new URL after x seconds. This should go in the HEAD of the document. But if you do this, also include a short text saying “Document moved to new URL so-and-so” for other browsers.
(The screwing-up bit refers to the fact that if you press “Back” after you have been redirected, you will be taken to the document with the META refresh. Then the refresh will be activated, and so you’ll jump to the page you just tried to leave.)
31. How do I get a back button on my page?
In HTML, this is impossible. Going “back” means that you go to the previous page in your history. You might be able to create a link to the URL specified in the “HTTP_REFERER” environment variable in your document, but that only creates a link to a new location in your history. Even worse, the information in that variable can be plain wrong. Some browsers incorrectly send the variable when you use a bookmark or type in an URL manually, and some don’t send that variable at all. Then you would end up with an empty link.
A JavaScript could use “history.back()” to do this, but this only works in Netscape 2.
32. How do I force a download?
You can’t. When someone downloads a document, the server tells the browser what type of file it is. The browser then picks the appropriate helper application, or displays it himself. If the server doesn’t know the file type, it tells the browser that the file is “text/plain”, or just plain text. You will have to ask your server admin to configure this particular file with the MIME type you want.
“Forcing” a download is not what you are supposed to do. After all, what is more convenient than having the proper application started when I download a particular file? Browsing through a download directory can be quite a pain. And most browsers allow the user to download to disk if they want to.
If the file must be saved to disk, as there is absolutely NO other way to handle it, the MIME type should be “application/octet-stream”.
33. Why is my binary file not downloaded, but shown on the screen?
Actually, the browser has downloaded the document, it is just treating it as a plain text file. This is because the server said it was a plain text file. To get the file in the helper application (or plug-in), you will have to configure the server to send out the right MIME type, and the browser to start the appropriate helper application for files with that MIME type.
34. How do I use an image instead of the standard submit button?
Use <INPUT NAME=foo TYPE=image SRC=”http://url.to/image.gif”> instead of the normal submit tag. There is no way to do this for the reset button.
Note that some browsers will also send the x and y coordinates of the location where the user clicked on the image to the server. They are available as “foo.x=000&foo.y=000″ in the CGI input.
35.. How do I get a so-and-so character in my HTML?
HTML text is supposed to be written in the ISO Latin-1 character set. A complete overview of all the characters in this set is available from:
36. How do I get a counter?
Either ask your Webmaster for access to the log files, or for a server-side include which can do this, or use one of the freeware counters available at the CGI archives. There is no HTML tag to do this.
Counters are quite ball less, though. They can be set to any value the owner wants, so they don’t give you any information. Because of the delay that often occurs when using an external counter, your visitors may get annoyed with the long loading time of your document. The server’s log file provides a lot more reliable information for you, and you don’t have to bother your readers with it.
37. How do I detect what browser is being used?
Many browsers identify themselves when they request a document. A CGI script will have this information available in the HTTP_USER_AGENT environment variable, and it can use that to send out a version of the document which is optimized for that browser.
Keep in mind not all browsers identify themselves correctly. Microsoft Internet Explorer, for example, claims to be “Mozilla 1.2″ to get at Netscape enhanced documents.
And of course, if a cache proxy keeps the Netscape enhanced document, someone with an other browser will also get this document if he goes through the cache.
38. I want to get an audio file to play automatically when someone visits my site!
Bleh. What if I visit your site at 3am, and there’s someone sleeping in the next room?
For Netscape, this is done using the <EMBED> tag. You can also do this with the Netscape <META> refresh tag, as described earlier. Just put the URL of the audio file in the CONTENT field.
There is also a MS Internet Explorer specific tag to do this: <BGSOUND SRC=URL> which plays the file specified in the SRC attribute automatically. You can add LOOP followed by a value or the keyword “INFINITE” to indicate how many times the sound should be played.
39. Should I put quotes around attribute values or not?
It depends. It is never wrong to use them, but you don’t have to if the attribute value consists only of letters, digits, periods and/or hyphens. This is explained in the HTML 2.0 specs.
Oh, and keep in mind that if you use double quotes, you should escape any quotes inside the value with “&quot;” so you don’t accidentally terminate the value prematurely.
40. Should I use lower case or upper case for tags?
Tags are case insensitive, so it doesn’t matter. This is just a matter of style. Many people prefer upper case, as it makes the tags “stand out” better amongst the text.
41. My images/hyperlinks are coming out all wrong, or don’t load! What’s up?
Most likely you forgot to close a quote at the end of an HREF or SRC. Alternatively, perhaps you used a “>” character in an ALT text or somewhere else inside a tag. Although this is legal, several older browsers will think the tag ends there, so the rest is displayed as normal text.
This especially happens if you use comment tags to “comment out” text with HTML tags. Although the correct syntax is <!– –> (without “–” occurring anywhere inside the comment), some browsers will think the comment ends at the first > they see.
42. How do I get a button which takes me to a new page?
This is done with a small form:
<FORM ACTION=”http://url.you.want.to.go.to/” METHOD=GET>
<INPUT TYPE=submit VALUE=”Text on button” NAME=foo>
</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.
43. Are html tags case sensitive?
No, Html tags are not case sensitive.
44.How to set position of table as center?
<table align=”center”> doesn’t work in all browser, you can do this by put table in <center> tag as
<center> <table> . . . </table> </center>
45.How can you add external JavaScript file in your html page?
By use of <script> tag in head section of html page as :
<script src=”/Script/jscode.js” type=”text/javascript”></script>
46.How to display bulleted list in html Page?
We can use of <ul> (unordered list) tag in html for display bulleted list.
Example:
<ul>
<li>HTML</li>
<li>Java Script</li>
<li>DHTML</li>
<li>CSS</li>
</ul>
47.How will you add external CSS file in your page?
We can use by link tag in head section of html page as :
<link rel=”stylesheet” type=”text/css” href=”mycss.css” />
48.How Open in New window on Click on Anchor Tag
By use of target=”_blank” Property of Anchor Tag.
Example:
<a href=”HTMLPage.htm” target=”_blank”>Link this</a>
49.How Img tag make as link in html
Use the <img> tag as the link content:
Example
<a href=”HTMLPage.htm” >
<img src=”image.gif” alt=”ImageAltValue” />
</a>
50.How will you Display a Image in background of html Page?
By use of background-image property of Style Sheet in Body Tag.
Example
<html>
<head>
<title>BackGround Image</title>
</head>
<body style=”background-image:url(‘image-path’)”>
<div>
Content of Body
</div>
</body>
</html>
51.How to add external .css file in the html page?
By use of link tag between head section of page as <link href=”style.css” rel=”stylesheet” type=”text/css” />
52.What is alt Property of img tag html ?
ALT property of <img> tag is use for display information about Image when mouse move over the Image and it is show about image info when image is unable to load, there fore user can understand what kind of image was actually there on the page that couldn’t be loaded.
53.How do I add scrolling text to my page?
Keep in mind not all browsers support scrolling text. however to do this add a tag similar to the below example.
THIS WOULD SCROLL
The above example would create the below scrolling text. If your browser supports scrolling text the below example should be scrolling.
54.How do I do multiple colors of text?
To do the multicolor text adjust the color of your font tag as shown below. blue
55.How do I make a link to another web page?
Specify the complete URL in the A HREF tag as shown below.
Visit ComputerHope Replace our address with the address that you would like to link. Where it says “Visit ComputerHope” replace this what you want to name the link.
56.What are the attributes that make up a DHTML?
DHTML is called as Dynamic HTML. This is used to increase the interactive ability and the visual effect of the web pages which is loaded in the browser.
57.How do we make a comment inside the CSS file?
/* include your comment here*/
58. How can we make each word in a text start with a capital letter using CSS?
We can use this property   text-transform: capitalize;
59. What are? the main difference between css2 and css3?
The main and biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it?s way through the W3C in various stages of the recommendation process.
60. What is the? grouping in CSS?
We can write style for two or more selectors that share the same style, only we need to comma separated list of every selector. Grouping is decrease number of line in our code.
61.What is difference between margin and padding in CSS ?
Below is the main difference between margin and padding…
Padding – defines space between border and element content
Margin – defines space between border and other outer elements
62.What is the difference between HTML and HTML5 ?
HTML5 is nothing more then upgreaded version of HTML where in HTML5 Lot of new future like Video, Audio/mp3, date
select function ,  placeholder ,  Canvas, 2D/3D Graphics, Local SQL Database added so that no need to  do external plugin
like Flash player or other library
63.What is the <!DOCTYPE> ? Is it necessary to use in HTML5 ?
The <!DOCTYPE> is an instruction to  the web browser about what version of HTML the page is written in. AND The<!DOCTYPE> tag does not have an end tag and It is not case sensitive.The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html>  tag. As In HTML 4.01,
all <! DOCTYPE >  declarations require a reference to  a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not
require a reference to  a Document Type Definition (DTD).
64. What’s new HTML 5 DocType and Charset?
As HTML 5 is now not a subset of SGML, its DocType is simplified as follows:
Collapse | Copy Code
<!doctype html>
<meta charset=”UTF-8″>
65. How can we embed Audio in HTML 5?
HTML 5 comes with a standard way of embedding audio files. Supported audio formats are MP3, Wav and Ogg.
<audio controls>
<source src=”jamshed.mp3″ type=”audio/mpeg”>
Your browser doesn’t support audio embedding feature.
</audio>
66. How can we embed Video in HTML 5?
Same like audio, HTML 5 defined standard way of embedding video files. Supported video formats are MP4, WebM and Ogg.
<video width=”450″ height=”340″ controls>
<source src=”jamshed.mp4″ type=”video/mp4″>
Your browser does’nt support video embedding feature.
</video>
67. What are the new media elements in HTML 5 other than audio and video?
HTML 5 has strong support for media. Other than audio and video tags, it comes with the following tags:
<embed> acts as a container for external application.
<track> defines text track for media.
<source> is helpful for multiple media sources for audio and video.
68. What is the usage of canvas Element in HTML 5?
<canvas> is an element in HTML5 which we can use to draw graphics with the help of scripting (which is most probably JavaScript).
This element behaves like a container for graphics and rest of the things will be done by scripting. We can draw images, graphs and a bit of animations etc. using <canvas> element.
<canvas id=”canvas1″ width=”300″ height=”100″>
</canvas>
69. What are the different types of storage in HTML 5?
HTML 5 has the capability to store data locally. Previously, it was done with the help of cookies. The exciting thing about this storage is that it’s fast as well as secure.
There are two different objects which can be used to store data:
localStorage object stores data for a longer period of time even if the browser is closed.
sessionStorage object stores data for a specific session.
70. What are the new Form Elements introduced in HTML 5?
There are a number of new form elements that have been introduced in HTML 5 as follows:
datalist
datetime
output
keygen
date
month
week
time
number
range
email
url
71. What are the deprecated Elements in HTML5 from HTML4?
Elements that are deprecated from HTML 4 to HTML 5 are:
frame
frameset
noframe
applet
big
center
basefront
72. What are the new APIs provided by HTML 5 standard?
HTML 5 standard comes with a number of new APIs. Few of them are as follows:
Media API
Text Track API
Application Cache API
User Interaction
Data Transfer API
Command API
Constraint Validation API
History API
and many more….
73. What is the difference between HTML 5 Application Cache and regular HTML Browser Cache?
One of the key features of HTML 5 is “Application Cache” that enables us to make an offline version of a web application. It allows to fetch few or all of website contents such as HTML files, CSS, images, JavaScript, etc. locally. This feature speeds up the site performance. This is achieved with the help of a manifest file defined as follows:
<!doctype html>
<html manifest=”example.appcache”>
…..
</html>
74.What is a tag? How can we use MARQUEE in HTML?
In HTML, a tag tells the browser what to do. When we create a HTML page, we enter tags in order to change the appearance of text, to show a graphic, or to make a link to another page.
The marquee tag is a non-standard HTML markup element type which causes text to scroll up, down, left or right.
<marquee height= width= scroll = direction= scroll amount=>text…</marquee>
75.What is a DOCTYPE?
The doctype declaration refers to a Document Type Definition (DTD) which specifies the rules for the markup language, so that the browsers can render the content correctly. According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document is using. Originally, the DOCTYPE declaration was only used by SGML-based tools like HTML valuators, which needed to determine which version of HTML, a document used.
76.How do we create a link? What are the three types of form tags in HTML?
We use an anchor element to create a link. The HREF attribute specifies the URL of the document that we 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>
A <form> tag has three attributes:
a. Method b.Action c. Ectype.
77.How do we specify page breaks in HTML?
There is no way in 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.
78.How do we use an image instead of the standard submit button?
We use <INPUT NAME=foo TYPE=image SRC=”http://url.to/image.gif”> instead of the normal submit tag. But there is no way to do this for the reset button.
79. What are meta tags and why it is used?
The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page but will be machine parsable and are typically used to specify page description keywords last modified and other metadata.
The <meta> tag always goes inside the head element. They can be used by browsers, search engines or other web services.
80.What is Semantic HTML? What are the reasons for validating a HTML?
Semantic HTML means using HTML tags for their implied meaning rather than using (meaninglessly). div and span tags are absolutely for everything. Depending on the tag the content in the tag can be interpreted in a certain way.
To ensure one shared HTML coding standard in the World Wide Web, smooth speed ability of the HTML page and better positioning of the HTML in Search Engines.
81.What is BODY in HTML document?
The effects which we want in the window are mentioned with the help of tags in the body. It is the place where the actual data is written in html. All the changes can be viewed by changing the tags content in the body whereas the head part is the introduction part and the body is the actual content part.
<BODY>data content</BODY>
82.What is SPAN in HTML?
The SPAN having notation as:<SPAN> </SPAN>is used for highlighting text of any color desired for adding colored text for adding background image to text. SPAN does not cause a line break. It delimits text and it allows styles to be applied to an ‘elemental’ region or for the ‘elemental’ region to be identified without causing a break in the text flow.
83.What are differences between DIV and SPAN?
Generally we use table and div tag for the layout. If we use table tag the site takes lot of time to load but if we use DIV tag it is quick & advance, especially in search engine. It has attributes position and all other feature like table tag.
Whereas SPAN is a like sub tag, which apply styles for the specified content in-between the SPAN tag. We can also use it for highlighting some text to fix extra space for any other text or content like those.
84.What are the differences between cell spacing and cell padding?
Cell spacing and Cell padding are used for formatting but there is a major difference between cell padding and cell spacing. It is as follows: Cell padding is used to set extra space which is used to separate cell walls from their contents whereas cell spacing is used to set space between cells.
The general format of specifying cell spacing cell padding are as follows:
< table width=”100″ border=”2″ cellspacing=”20″>
< table width=”100″ border=”2″ cellpadding=”5″>
One can also apply cell spacing and cell padding together. It is done as follows:
< table width=”100″ border=”2″ cellpadding=”5″ cellspacing =”20”>
85.How do we make a picture as a background on my web pages?
We point the body background to the name of our image we wish to use as the background as shown below. This body line should be the first line after </head> tag. We can also have the background image fixed, so it does not move when using the scroll bar in the browser. To do this we add the BGPROPERTIES tag as shown below.
<body background=”picture.gif” bgproperties=”fixed”>
86.What are the various text formatting tag in HTML?
<b>defines bold text;<br>inserts a single line break;<center> defines centered text;<em>defines emphasized text;<hr>defines a horizontal rule;
<i>defines italic text;<p>defines a paragraph;<u>defines underlined text.
87.How can I copy something from a webpage to my webpage?
1: Plaintext or any text information viewable from your browser can be easily copied like any other text from any other file.
2; HTML and web scripts – you will need to view the web page’s source code. In the page’s source code, copying the <script> and </script> tags as well as all the information in-between these tags will usually enable the script to work on your web page.
3: Images, sounds, or movies – Almost all images, sounds, and movies can be copied to your computer and then viewed on your webpage. Images can be easily copied from a webpage by right-clicking an image and selecting “Save Picture as” or “Save Image as”. Unless the sound or movies file has a direct link to download and save the file to a specified location on your hard disk drive or to view your Internet browser’s cache and locate the sound or movie file saved in the cache.
4. Embedded objects – Looking at the source code of the object to determine the name of the file and how it is loaded, and copy both the code and the file.
88.Why does not my title show up when I click check it out?
You’re probably looking at the wrong part of the screen. The Title usually shows up in the Title Bar on the Window, to the left of the minimize/maximize buttons on graphical browsers.
89.What is the difference between the HTML form methods GET and POST?
The method parameter specifies which method the client is using to send information to the WEB server. The method determines which parameter you will find the CGI request data in:
? POST – post_args
? GET – http_search_args
90.How do I put sounds for older versions of Internet Explorer?
For older versions of Internet Explorer, this technique was used <BG SOUND=”sound.ext”>.
91.How to transferring user to new web page automatically?
You will need to use the below meta tag.
<META HTTP-EQUIV=”Refresh” CONTENT=”2″; URL=”http://www.yourname.com”>
Placing the above tag in your <HEAD></HEAD> will load yousite.com in 2 seconds.
Changing the 2 value on CONTENT=”2″ to another value will increase or decrease the delay until loading the new page.
92.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.
93.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.
94.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.
95.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.
96.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.
97.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.
98.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.
99.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.
100.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.
101.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.
102.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.
103.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.
104.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.
105.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.

No comments:

Post a Comment