0% found this document useful (0 votes)
76 views

What Is HTML

HTML is a markup language used to structure and present content for display on the internet. It uses tags to indicate elements like headings, paragraphs, lists, links and more. A basic HTML page includes <html>, <head>, and <body> tags with title and content. HTML5 introduced new form elements, audio/video embedding, and local storage capabilities. Comments can be added with <!-- --> and tags are not case sensitive.

Uploaded by

Jason Holloway
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

What Is HTML

HTML is a markup language used to structure and present content for display on the internet. It uses tags to indicate elements like headings, paragraphs, lists, links and more. A basic HTML page includes <html>, <head>, and <body> tags with title and content. HTML5 introduced new form elements, audio/video embedding, and local storage capabilities. Comments can be added with <!-- --> and tags are not case sensitive.

Uploaded by

Jason Holloway
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

What is HTML?

Answer1:
HTML, or HyperText Markup Language, is a Universal language which allows an individual
using special code to create web pages to be viewed on the Internet.

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.
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!
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.
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.
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.
How comfortable are you with writing HTML entirely by hand?
Very. I dont 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 Ill 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 (its 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 doesnt 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.
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.
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.
Can I nest tables within tables?
Yes, a table can be embedded inside a cell in another table. Here's a simple example:

<table>
<tr>
<td>this is the first cell of the outer table</td>
<td>this is the second cell of the outer table,

with the inner table embedded in it
<table>
<tr>
<td>this is the first cell of the inner table</td>
<td>this is the second cell of the inner table</td>
</tr>
</table>
</td>
</tr>
</table>

The main caveat about nested tables is that older versions of Netscape Navigator have problems
with them if you don't explicitly close your TR, TD, and TH elements. To avoid problems,
include every </tr>, </td>, and </th> tag, even though the HTML specifications don't require
them. Also, older versions of Netscape Navigator have problems with tables that are nested
extremely deeply (e.g., tables nested ten deep). To avoid problems, avoid nesting tables more
than a few deep. You may be able to use the ROWSPAN and COLSPAN attributes to minimize
table nesting. Finally, be especially sure to validate your markup whenever you use nested tables.

How can we embed Audio in HTML 5?
TML 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>

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>
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.
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

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>
As compared with traditional browser caching, it's not compulsory for the user to visit website
contents to be cached.
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?
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 "[email protected]". 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.
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.
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">
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.
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.
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>

iframe in HTML is used to display a web page within a web page.
-True
An HTML file written in notepad can be saved with an extension:
-.htm
-.html
-Any of the above
-None of the above.

Which of the following is true about links by default?
-An unvisited link is underlined and blue.
-A visited link is underlined and red.
-An active link is underlined and purple.
-All the above.
The href attribute in the link tag specifies the:
-Destination of a link.
-Link.
-Hypertext
-None of the above

HTML Event Attributes onload fires just before the page is finishing loading.
False
HTML Event Attributes onunload fires
-when the browser window has been closed
-when the browser window is minimized
-when the browser window has changed focus to other window.
-After the page is finished loading
HTML Form Events ___________, fires the moment that the element loses focus.
-onblur
-onfocus
-onchange
-onlostfocus
Which of the following tags below are used for a multi-line text input control?
-textml tag
-text tag
-textarea tag
-Both b and c above

What is cell padding?
-Used to separate cell walls from their contents.
-Used to set space between cells
-Both a and b above
-Used to provide width to a cell

What are meta tags used for?
-To store information usually relevant to browsers and search engines.
-To only store information usually relevant to browsers
-To only store information about search engines.
-To store information about external links

When you use a heading tag in a document, what does the Web browser assume?
-Heading information is to appear in bold letters
-Heading information is to appear on its own line
-Heading information has a hyperlink
-Heading information is shown as a size six

What is the difference between XML and HTML?
-HTML is used for exchanging data, XML is not.
-XML is used for exchanging data, HTML is not.
-HTML can have user defined tags, XML cannot
What is mean by DTD?
-Document type data
-Data type definition
-Document type definition
-Definition type document

DOM stands for
-Document object model
-Data object model
-Document Oriented model
-Data oriented model

Text/Html is called the __________ of the page
-content type
-MIME type
-content type/MIME type
-none of these

Which HTML attribute is used to define inline styles?
-font
-class
-styles
-style
Which is the correct CSS syntax?
-body:color=black
-{body;color:black}
-{body:color=black(body}
-body {color: black}
What does an HTML tag do?
-It specifies formatting and layout instructions for your web page.
-It hides programming instructions from view.
-It determines the organizational structure of your Web site.
-It connects your web site to an operating environment.

When you use a heading tag in a document, what does the Web browser assumes?
-Heading information is to appear in bold letters
-Heading information is to appear on its own line
-Heading information has a hyperlink
-Heading information is shown as a size six

What is meant by the cellspacing attribute?
-It makes the cell span more than one column
-It specifies the space between the cell wall and the contents of the cell.
-It specifies the space between two cells.
-It makes the cell span more than one row

Which of the following attributes comes in handy when borders have to be put between
groups of columns instead of every column?
-col
-colgroup
-rowspan
-row

A few lines in an HTML paragraph are to be formatted differently from the rest of the lines.
Which tag will assist in this?
-div
-p
-span
-format

You might also like