HTML Questions
HTML Questions
HTML Questions
HTML is short for HyperText Markup Language and is the language of the World
Wide Web. It is the standard text formatting language used for creating and
displaying pages on the Web. HTML documents are made up of two things: the
content and the tags that format it for proper display on pages.
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.
No, there are single HTML tags that do not need a closing tag. Examples are the
<img> tag and <br> tags.
4) What are some of the common lists that can be used when designing a
page?
– ordered list
– unordered list
– definition list
– menu list
– directory list
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.
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.
9) 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.
To insert the copyright symbol, you need to type © or & #169; in an HTML
file.
11) 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.
12) Is there any way to keep list elements straight in an HTML file?
When you use image maps, it can easily become confusing and difficult to
determine which hotspots correspond to which links. Using alternative text lets,
you put a descriptive text on each hotspot link.
17) 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.
18) 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.
19) 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 site.
With ordered lists, you can select to use some different list types including
alphabetical and Roman numerals. The type attribute for unordered lists can be
set to disc, square, or circle.
To create text with different colors, use the <font color=”color”>…</font> tags
for every character that you want to apply color.
22) 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.
If two sets of HTML tags are overlapped, only the first tag will be recognized. You
will find this problem when the text does not display properly on the browser
screen.
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.
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.
30) 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.
31) 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.
32) What is the difference between the directory and menu lists and the
unordered list?
The key difference is that the directory and menu lists do not include attributes
for changing the bullet style.
The bullet color is always the same as that of 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.
The default size for a text field is around 13 characters. However, 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.
35) 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.
36) 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.
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.
39) 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.
40) Are there instances where the 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.
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.
42) 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.
43) 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.
44) 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.
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.
When 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.
49) 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.
50) 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.
The latest versions of Google Chrome, Apple Safari, Mozilla Firefox, and Opera all
support most of the HTML5 features.
<Video> and <Audio> are new tags which are included in HTML5 version. They
are mainly used as a replacement for Flash, Silverlight, and similar technologies to
play multimedia items.
53) Do you know which are two semantic tags are included in HTML5
version?
The <article> and <section> tags are two new tags that are included in HTML5.
Articles can be composed of multiple sections that can have multiple articles. An
article tag represents a full block of content which is a section of a bigger whole.
54) What is <figure> in HTML5?
56) What are the new FORM elements which are available in HTML5?
The new Form elements in HTML5 offers much better functionality than the
earlier versions.
1) <datalist> – This tag is use to specify a list of options for input controls.
Session Storage:
It stores data of current session only. It means that the data stored in session
storage clear automatically when the browser is closed.
Local Storage:
Local storage is another type of HTML5 Web Storage. In local storage, data is not
deleted automatically when the current browser window is closed.
The Application Cache concept means that a web application is cached. It can be
accessible without the need for internet connection.
1. Offline browsing – Web users can also use the application when they are
offline.
2. Speed – Cached resources load quicker
3. Reduce the server load – The web browser will only download updated
resources from the server.
60) Explain five new input types provided by HTML5 for forms?