What Is HTML
What Is HTML
y HTML stands for Hyper Text Markup Language y HTML is not a programming language, it is a markup language y A markup language is a set of markup tags y HTML uses markup tags to describe web pages HTML Tags HTML markup tags are usually called HTML tags y HTML tags are keywords surrounded by angle brackets like <html> y HTML tags normally come in pairs like <b> and </b> y The first tag in a pair is the start tag, the second tag is the end tag y Start and end tags are also called opening tags and closing tags HTML Documents = Web Pages y HTML documents describe web pages y HTML documents contain HTML tags and plain text y HTML documents are also called web pages The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page: <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> Example Explained y The text between <html> and </html> describes the web page y The text between <body> and </body> is the visible page content y The text between <h1> and </h1> is displayed as a heading y The text between <p> and </p> is displayed as a paragraph What You Need You don't need any tools to learn HTML at W3Schools. y You don't need an HTML editor y You don't need a web server y You don't need a web site Editing HTML HTML can be written and edited using many different editors like Dreamweaver and Visual Studio.
However, in this tutorial we use a plain text editor (like Notepad) to edit HTML. We believe using a plain text editor is the best way to learn HTML. Create Your Own Test Web If you just want to learn HTML, skip the rest of this chapter. If you want to create a test page on your own computer, just copy the 3 files below to your desktop. (Right click on each link, and select "save target as" or "save link as") mainpage.htm page1.htm page2.htm After you have copied the files, you can double-click on the file called "mainpage.htm" and see your first web site in action. Use Your Test Web For Learning We suggest you experiment with everything you learn at W3Schools by editing your web files with a text editor (like Notepad). Note: If your test web contains HTML markup tags you have not learned, don't panic. You will learn all about it in the next chapters. .HTM or .HTML File Extension? When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference, it is entirely up to you. HTML Headings HTML headings are defined with the <h1> to <h6> tags. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3> Try it yourself
HTML Paragraphs HTML paragraphs are defined with the <p> tag. Example <p>This is a paragraph.</p> <p>This is another paragraph.</p> Try it yourself
HTML Links HTML links are defined with the <a> tag. Example <a href="http://www.w3schools.com">This is a link</a>
Try it yourself Note: The link address is specified in the href attribute. (You will learn about attributes in a later chapter of this tutorial). HTML Images HTML images are defined with the <img> tag. Example <img src="w3schools.jpg" width="104" height="142" /> Try it yourself Note: The name and the size of the image are provided as attributes. HTML Elements An HTML element is everything from the start tag to the end tag: Start tag * Element content End tag * <p> This is a paragraph </p> <a href="default.htm" > This is a link </a> <br /> * The start tag is often called the opening tag. The end tag is often called the closing tag. HTML Element Syntax y An HTML element starts with a start tag / opening tag y An HTML element ends with an end tag / closing tag y The element content is everything between the start and the end tag y Some HTML elements have empty content y Empty elements are closed in the start tag y Most HTML elements can have attributes Tip: You will learn about attributes in the next chapter of this tutorial. Nested HTML Elements Most HTML elements can be nested (can contain other HTML elements). HTML documents consist of nested HTML elements. HTML Document Example <html> <body> <p>This is my first paragraph.</p> </body> </html> The example above contains 3 HTML elements. HTML Example Explained The <p> element:
<p>This is my first paragraph.</p> The <p> element defines a paragraph in the HTML document. The element has a start tag <p> and an end tag </p>. The element content is: This is my first paragraph. The <body> element: <body> <p>This is my first paragraph.</p> </body> The <body> element defines the body of the HTML document. The element has a start tag <body> and an end tag </body>. The element content is another HTML element (a p element). The <html> element: <html> <body> <p>This is my first paragraph.</p> </body> </html> The <html> element defines the whole HTML document. The element has a start tag <html> and an end tag </html>. The element content is another HTML element (the body element). Don't Forget the End Tag Some HTML elements might display correctly even if you forget the end tag: <p>This is a paragraph <p>This is a paragraph The example above works in most browsers, because the closing tag is considered optional. Never rely on this. Many HTML elements will produce unexpected results and/or errors if you forget the end tag . Empty HTML Elements HTML elements with no content are called empty elements. <br> is an empty element without a closing tag (the <br> tag defines a line break). Tip: In XHTML, all elements must be closed. Adding a slash inside the start tag, like <br />, is the proper way of closing empty elements in XHTML (and XML). HTML Tip: Use Lowercase Tags HTML tags are not case sensitive: <P> means the same as <p>. Many web sites use uppercase HTML tags. W3Schools use lowercase tags because the World Wide Web Consortium (W3C) recommends lowercase in HTML 4, and demands lowercase tags in XHTML. HTML Attributes y HTML elements can have attributes y Attributes provide additional information about an element y Attributes are always specified in the start tag
Attribute Example HTML links are defined with the <a> tag. The link address is specified in the href attribute: Example <a href="http://www.w3schools.com">This is a link</a> Try it yourself
Always Quote Attribute Values Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed. Tip: In some rare situations, when the attribute value itself contains quotes, it is necessary to use single quotes: name='John "ShotGun" Nelson' HTML Tip: Use Lowercase Attributes Attribute names and attribute values are case-insensitive. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation. Newer versions of (X)HTML will demand lowercase attributes. HTML Attributes Reference A complete list of legal attributes for each HTML element is listed in our: Complete HTML Reference Below is a list of some attributes that are standard for most HTML elements: Attribute Value Description class classname Specifies a classname for an element id id Specifies a unique id for an element style style_definition Specifies an inline style for an element Specifies extra information about an element (displayed title tooltip_text as a tool tip) HTML Headings Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3> Try it yourself Note: Browsers automatically add some empty space (a margin) before and after each heading. Headings Are Important Use HTML headings for headings only. Don't use headings to make text BIG or bold.
Search engines use your headings to index the structure and content of your web pages. Since users may skim your pages by its headings, it is important to use headings to show the document structure. H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on. HTML Lines The <hr /> tag creates a horizontal line in an HTML page. The hr element can be used to separate content: Example <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> Try it yourself
HTML Comments Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. Comments are written like this: Example <!-- This is a comment --> Try it yourself Note: There is an exclamation point after the opening bracket, but not before the closing bracket. HTML Tip - How to View HTML Source Have you ever seen a Web page and wondered "Hey! How did they do that?" To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page. HTML Tag Reference W3Schools' tag reference contains additional information about these tags and their attributes. You will learn more about HTML tags and attributes in the next chapters of this tutorial. Tag Description <html> Defines an HTML document <body> Defines the document's body <h1> to <h6> Defines HTML headings <hr /> Defines a horizontal line <!--> Defines a comment
HTML Paragraphs
Paragraphs are defined with the <p> tag.
Example
<p>This is a paragraph</p> <p>This is another paragraph</p> Try it yourself
Note: Browsers automatically add an empty line before and after a paragraph.
Example
<p>This is a paragraph <p>This is another paragraph Try it yourself
The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors. Note: Future version of HTML will not allow you to skip end tags.
Example
<p>This is<br />a para<br />graph with line breaks</p> Try it yourself
The <br /> element is an empty HTML element. It has no end tag.
More Examples
More paragraphs The default behaviors of paragraphs.
<b> or <i> defines bold or italic text only. <strong> or <em> means that you want the text to be rendered in a way that the user understands as "important". Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a text highlighted with the strong feature, it might be cursive for example and not bold!
<code> Defines computer code text <kbd> Defines keyboard text <samp> Defines sample computer code <tt> Defines teletype text <var> Defines a variable <pre> Defines preformatted text
http://www.ex-designz.net/infotechquiz.asp
1) What does XML stand for?
b) X-Markup Language
a) 1-2-4_6
c) ;123456
d) 3:4;-7
3) DOM 2 doesn't provide mechanism for interrogating and modifying the namespace for a document.
a) True
4) The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype _______. It is encoded using _______ encoding scheme.
c) UNICODEString, Unicode
d)
5) An MNC receives at its headquarter from its subsidiaries, XML documents containing various reports of that subsidiary. These reports need to be displayed to the person responsible at the headquarter for that subsidiary in a user-friendly manner (allowing searches through the document) and the person is allowed to make any changes/comments that he/she desires. Once the user is done with all the changes/comments the information needs to be fed into the central database. Which of the following is MOST appropriate for processing these XML documents?
b) SAX
c) CSS
d) XSL
6) Which of the following is an XML-based service IDL that defines the service interface and its implementation characteristics.
a) UDDI
c) SOAP
d) Path
a) Elements may nest but not overlap - correct answer have multiple attributes with the same name
8) What is the correct declaration syntax for the version of XML document?
c) Elements may
a) <name></name
b) <name />
c) <name/>
b) False
b) False
a) True
b) False
14) For the XML parser to ignore a certain section of your XML document, which syntax is correct?
a) <![CDATA[ Text to be ignored ]]> - correct answer b) <xml:CDATA[ Text to be ignored ]> <PCDATA> Text to be ignored </PCDATA> d) <CDATA> Text to be ignored </CDATA>
15) What is a correct way of referring to a stylesheet called "style.xsl"?
c)
a) <stylesheet type="text/xsl" href="style.xsl" /> b) <link type="text/xsl" href="style.xsl" /> stylesheet type="text/xsl" href="style.xsl" ?> - correct answer
c) <?xml-
b) <age>
c) <NAME> b) Dynamic Type Definition c) Direct Type Definition c) The fact that its
b) Its ability to adapt to new uses - correct answer a) Not as much coding is needed supported by all of the major software vendors
19) Unlike most other markup languages, including HTML, XML allows you to do what?
a) Create new tags - correct answer with closing tags optional a) 1994 b) 1995
20) In what year did the World Wide Web Consortium release its draft of XML?
d) 1997
21) What organization presented the first version of Starndardized Generalized Markup Language (SGML) in 1980?
b) IEEE
22) You can use XSL Transformation (XSLT) to convert database files described by XML to Structured Query Language (SQL) statements, which creates the tables, indexes and views that the XML data describes.
b) False
a) X-function of HTML b) Ex Hyper Text Markup Language c) Extensible Hypertext Markup Language - correct answer d) Extensible Hype Manditory Learning
a) A method tied to an object b) A Detrimental Transitional Development c) The Document Type Declaration - correct answer d) The Difinitive Type Definition
a) XHTML and SGML are both subsets of HTML b) XHTML is a subset of SGML - correct answer c) SGML is a subset of XHTML d) SGML is a simplified version of XHTML
a) XHTML documents are not parsed in the browser before display - correct answer b) XHTML is parsed with a DTD c) The Doctype Declaration indicates to the parser which DTD to use d) XHTML syntax needs to be well formed
a) XHTML is more advanced than HTML - correct answer b) HTML and XHTML are both the same language c) XML and XHTML are written in the same mannor d) HTML will load faster than XHTML in most cases
a) HTML will still be the choice of most professional web developers for many years to come - correct answer b) XHTML will replace most of the HTML pages on the internet c) XHTML is a replacement for HTML d) HTML causes a lot of problems on the internet in it current form
a) It is not always best to validate XHTML b) The statment is false c) This is a true statement - correct answer d) XHTML is not validated
a) The code should be written in uppercase letters b) The XHTML document should be valid and well formed - correct answer c) All end tags should be left open d) You require a special type of browser
9) In writing XHTML ?
a) The opening and closing tags should start and end with XHTML b) The end tags of the img tag should be left open c) Uppercase letters should not be used between the opening and closing tags - correct answer
d) The Doctype Declaration should have a closing tag simular to the img tag or the meta tag
a) Attributes do not have quotes for their values b) All attributes values require quotes - correct answer c) All values require attributes
13) What is the correct XHTML for an attribute and its value?
a) doctype, html and body b) doctype, html, head, body, and title - correct answer c) doctype, html, head, and body
a) <p>A <b><i>short</b></i> paragraph</p> b) <p>A <b><i>short</i></b> paragraph</p> - correct answer c) <p>A <b><i>short</i></b> paragraph</P>
18) Which of the following is the right use of the lang attribute?
a) <div lang="en" xml:lang="en">Hello World!</div> - correct answer b) <div xml:language="en">Hello World!</div> c) <div language="en">Hello World!</div>
a) Strict, Transitional, Loose, Frameset b) Strict, Transitional, Frameset - correct answer c) Strict, Transitional, Loose
a) It is a new hybrid technology that is different from both XML and HTML. b) You can't use it to create Web pages. c) It is a reformulation of HTML in XML. - correct answer d) It has totally replaced HTML as the tool for building Web pages.
2) A friend has designed a graphic containing several words. Why should he/she choose to save this image file as a GIF rather than a JPG?
a) JPG's render true color poorly at some screen resolutions, whereas GIFs do not. b) The GIF file format is tailored to the Internet, whereas the JPG was developed for storage only. c) The file compression features of the JPG format may render the fonts unreadable. - correct answer d) JPG's are about three times the size of GIFs and therefore take more time to render in a browser.
3) Which of the following correctly describe the nature of ActiveX (Choose all that apply)?
a) It is a programming language b) It has full access to the Windows operating system c) It is a set of rules for how applications should share information d) It is riskier than Java applets in terms of security e) Either BCD - correct answer
a) Color and background properties b) Bi-directional text c) Positioning of elements on the page d) Styles for tables e) Either ABC - correct answer
5) You noticed that you cannot see the applet while the page is loading. What's the reason for it?
a) incorrect file permission settings b) applets must register all its parameters with the JVM before it can function - correct answer c) applets are protected d) applets are not registered
c) It has no server side form processing features. - correct answer d) It has no client side form processing features.
7) Which of the following correctly describe the features of Flash (choose all that apply)?
a) vector-graphic based animation b) browser independent c) bandwidth friendly d) requires client side plug-ins e) All of the above - correct answer
a) It uses OLE as the database technology b) There is no official standard - correct answer c) It is a substitute to ActiveX control d) It is developed by W3C
9) In DreamWeaver Chad can change the Default Text in the Status Bar of his web page by changing its properties through the what?
a) Objects Palette. b) Properties Palette. c) Layers Inspector. d) Behaviours Inspector. - correct answer
a) The use of SCRIPT tags in line with the HEAD and BODY tags. b) The addition of the INLINE tag within the controlling HTML. c) The embedding of scripting instructions within certain HTML tags. - correct answer d) The physical justification of the script (major routines on the left, and lesser routines indented and on the right).
a) CGI b) Server Script c) Server side processor d) Servlet - correct answer e) Java Server Script
a) None of the choices. b) graphic tablet c) VGA table d) palette - correct answer e) color index
14) Which of the following are the attributes that can be used with the APPLET tag ?
15) Using inline styles on a page with multiple overlapping styles is being referred to as:
16) You use HTTP-EQUIV together with ____________ to cache a page to the Browser's folder on the hard drive.
17) What view in Microsoft FrontPage would you use if you wanted to view all the pages in your web site in a tree structure?
a) Folders View b) All Files View c) Task View d) Themes View e) Navigation View - correct answer
18) Your company wants to be able to give the customers only, access to the inventory as well as place orders over the internet. What type of Web site would this be considered?
19) When using the ISINDEX tag, how do you override the default message?
a) you cannot do this b) use the ASK attribute c) use the MESSAGE attribute d) use the PROMPT attribute - correct answer
20) Higher-end (24-bit) monitors are capable of displaying how many colors?
21) Lower-end (8-bit) monitors are capable of displaying how many colors?
22) When it comes to designing web pages, it is imperative to use colors that most monitors can safely display. How many colors are cosidered websafe?
a) What You Saw Is What You Got b) What You See is What You Get - correct answer c) What You Seen is What You Gotten d) What You Sew is What You Get
24) When you are hyperlinking to a page WITHIN your website, it is better to use which linking style?
25) There are times when you want a link to another website to open in a separate window. Which scenario best fits?
a) Have another window open making it easier for the user to surf the linked website b) Keep my website in the original window so the user will come back to it - correct answer c) Be sure that the user has JavaScript enabled in their browser
26) Navigation within a website is important. Which best defines how a navigation system be setup?
a) There is no standard. Navigation is dependent upon the web designer. b) It should be consistent throughout the site as far as appearance and functionality. It should also be compatible with all browsers. - correct answer c) Make it complex so the visitor will try to figure out what to do.
27) During the user testing phase of development, testers should always be take from:
a) The most experienced technical personnel employed by the company. b) The general public. c) Users already familiar with the application. d) Users unfamiliar with the application. - correct answer
a) A good navigation plan should include shortcuts. b) Common navigational schemes include the items: FAQ, Search, About, and Site Map. c) The visitor should not have to click more than 3 times to reach a desired page. d) Icons and logos should be avoided in navigational structures because graphic files increase download times. - correct answer
a) Sent by the server to all clients. b) Sent by the server in response to a client request. - correct answer c) Sent by the client and stored on the server after the client user has signed a digital certificate. d) Received by a client immediately after an e-commerce transaction is completed.
30) FTP and SSL are protocols which operate on port numbers:
a) 21 and 443 respectively. - correct answer b) 21 and 444 respectively. c) 23 and 443 respectively. d) 443 and 21 respectively. OSI Model Quiz Result
Scrolldown to review your answer and view your score. Passing grade is 70% = C.
a) physical b) transport c) network - correct answer d) MAC sublayer of the data link layer
2) Bits are packaged into frames at which layer of the OSI model?
a) it facilitates troubleshooting b) it breaks the complex process of networking into more manageable chunks c) it allows layers developed by different vendors to interoperate. d) all of the above - correct answer
4) The layers of the OSI model, from the top down, are:
a) application, presentation, session, transport, network, data link, physical - correct answer b) session, presentation, data transport, MAC, network, physical
c) physical, data link, network, transport, session, presentation, application d) application, encryption, network, transport, logical link control, physical
a) FTP and HTTP b) SMTP c) UDP d) midi and jpeg - correct answer e) all of the above
a) TCP and UDP - correct answer b) ATM c) CISC d) HTTP and FTP
a) presentation and session b) application and presentation c) application, presentation, and session - correct answer d) application, presentation, session, and transport e) application
e) data link
10) The network layer uses physical addresses to route data to destination hosts.
12) Which layer establishes, maintains, and terminates communications between applications located on different devices?
14) Which layer handles the formatting of application data so that it will be readable by the destination system?
16) Which layer translates between physical (MAC) and logical addresses?
a) Organization Standards International b) Open Systems Interconnect - correct answer c) Operating Standard Information d) Operating System Interconnection e) Open Systems Interface
20) Most logical addresses are preset in network interface cards at the factory
a) MAC and IPX b) hardware and frame c) MAC and LLC - correct answer d) WAN and LAN e) Mac address
a) the MAC sublayer of the data link layer b) transport c) physical d) network - correct answer e) presentation
24) Which layer is responsible for packet sequencing, acknowledgments, and requests for retransmission?
a) network b) session c) transport - correct answer d) data link e) presentation Network Plus Quiz Result
Scrolldown to review your answer and view your score. Passing grade is 70% = C.
a) 802.1 b) 802.2
a) 50 Ohm Terminator b) Crimp Connector c) Null Connector d) Loop Connection e) No Termination Needed - correct answer
4) You install a network adapter on IRQ 3, which of the following might it conflict with?
a) COM1 b) COM2 - correct answer c) Keyboard d) Hard Drive Controller e) Display Card
a) Active Directory b) Domain Name System c) NDS - correct answer d) NWLink e) DNS
6) What diagnostic tool helps you find a malfunctioning network interface card?
7) Which type of backup copies files created or changed since the last full backup?
9) What utility do you use in Windows 95 to release your IP address from a DCHP server?
11) What utility can you use to verify a remote computer is accepting connections on the port you are using?
a) 1 b) 2 c) 3 d) 4 - correct answer e) 5
a) 1 b) 2 c) 3 - correct answer d) 4 e) 5
14) Where can you set the maximum age of a password in Windows NT 4?
a) User Manager for Domains - correct answer b) Local User Manager c) Control Panel d) Services Manager e) Windows Registry
15) What is the first thing to do when you discover a problem on your network?
a) Call Vendor Tech Support b) Go on lunch break c) Determine the scope of the problem - correct answer d) Isolate the proble e) Set up a sub-network to test the problem
20) Which of the following is required if you change your servers from Windows NT 3.51 to Windows NT 4.0?
a) Patch b) Upgrade - correct answer c) DLL Replacement Files d) Clean Install e) Dual Boot Operating Systems
21) Where do the MAC sublayers fit into the OSI model?
d) Presentation e) Physical
22) In older Network Interface Cards, what is the configuration of the switches?
a) Single Inline pin b) Dual Inline pin - correct answer c) Switch integrated pin d) Dual integrated pin e) Single inline memory module
24) What is the total bandwidth of an ISDN BR1 line (in Kbps)?
a) Share level b) User Level - correct answer c) Resource level d) Secure Level e) Network Level
a) pico pass.conf -[OLD PASSWORD] [NEW PASSWORD] b) PASSWD - correct answer c) PASSWORD d) CHPASS e) SETPASS
a) a collection of values sent as cookies in a HTTP header b) a collection of data sent with a submitted form c) from client variables described from within an object d) from the OS module e) A&B - correct answer
4) In ASP, the Response Object is used to send output to the user from the server.
a) Active Server Protocol b) ActiveX Server Pages c) Active Setup Pages d) Active Server Pages - correct answer e) Active Setup Protocol
a) <!-- Comment a line in ASP --> b) < Comment a line in ASP > c) 'Comment a line in ASP - correct answer d) <% Comment a line in ASP %>
9) Which is better in managing your code when writing with ASP or any other scripting code?
a) Break it up into smaller easier-to-manage files that can serve as subroutines and function calls. - correct answer b) Keep it nice and simple in one file and use subroutines and function calls.
10) My ASP page won't work is a common complaint for those new to ASP. Which of these can be the cause?
a) Syntax error such as missing parentheses, comma or quotation mark. b) Comments in your code are not tagged properly as comments. c) Make sure function names have both opening and closing parentheses. d) Check to see that the web page is properly saved with the extension as .asp e) All of the above - correct answer
11) You want to add ASP capability to your company's website. What is the first thing you would check?
a) That all pages are saved in .asp extensions. b) Check that the web server has Microsoft FrontPage extensions installed. c) Make sure the web server is capable of hosting ASP pages. - correct answer d) Check the coding and be sure the ASP code is surrounded with <% and %> e) All of the above
12) You have determined that your company's website is housed on a web server that cannot handle ASP. What would you do?
a) Contact the ISP and have them switch the website to have ASP capability. b) Have your ISP install the Microsoft FrontPage extensions c) Develop a transition plan first that includes a step-by-step plan on every detail prior to contacting the ISP. correct answer
13) Some say that JavaScript is easier to use than ASP and will run regardless of whatever operating system the web server is using (Unix, Linux, Windows 2000, etc). Then others say that ASP has advantages over JavaScript such as what?
a) ASP does not depend upon which browser the viewer is using. b) ASP code does not show up in the source code; thus, the code is protected c) ASP does not download with the page to the viewer. d) ASP can easily interact with a database. e) All of the above - correct answer
14) A feature of ASP is its ability to interact with a database. Which of these databases is the most popular to use with ASP?
a) dBase b) Delimited text files c) Access (97 or 2000) - correct answer d) Excel spreadsheets e) SQL
a) Client-side executable code (executes at the browser level) - correct answer b) Server side executable code (runs at the server only)
a) Client-side executable code (executes at the browser level) b) Server side executable code (runs at the server only) - correct answer
17) Client-side scripting code and server-side scripting code can coexist and can be used on the same page.
18) Variable are used to hold both numerical and text values. Which of these IS NOT a valid variable name?
d) date-of-birth e) date_of.birth
20) You have a long piece of code tracking employee salaries. In your opinion, which of these variables is the best (shortest yet most descriptive) to use throughout the code to track the salaries of the managers? Keep in mind that you may try to analyze your
a) a client-side executable code. b) a server-side executable code. - correct answer c) a world-wide-web executable code. d) all of the above.
22) Which programming language is most commonly used to script ASP code?
d) C++ e) Perl
24) What happens when a user types in a URL that requests an ASP page?
a) Browser requests ASP code, server returns code, browser executes code into HTML form b) Browser requests ASP code, server executes ASP code and returns HTML document to browser - correct answer c) Browser requests code, server returns code, Windows executes code since ASP is Microsoft code.
25) If the default pages in HTML are index.htm, default.html, etc, what are the default pages in ASP?
26) When writing ASP code, what are the correct delimiters to use?
a) <!-- code --> b) < code > c) <% code > d) <% code %> - correct answer
27) It is imperative when writing ASP code is to begin every file with which statement?
a) <% Language=VBScript %> b) <% ASPLanguage = VBScript %> c) <%@ Language=VBScript %> - correct answer
28) In order for you to execute ASP code on your computer, you need to be running web server software such as Personal Web Server.
29) ASP code can be written in any text editor such as Notepad.
30) Thinking Question: ASP code can be written to show the current time. Is it possible to show a live, ticking clock using ASP?
a) Yes, ASP will pull the time from the web server and feed it to the client browser. b) No, once the ASP script has finished executing, it cannot do any more after the page reaches the client browser. - correct answer
ASP ADO Quiz Result
Scrolldown to review your answer and view your score. Passing grade is 70% = C.
a) Open the database, interact with the db, close the database b) Open a connection, interact with the db, close the connection - correct answer
3) ActiveX Data Objects (ADO) comes installed with ASP and allows your pages to easily connect to databases. Which two ADO objects are used to open a connection and interact with the database?
a) Connection object, RecordingSet object b) Connection object, Recordset object - correct answer c) Connect object, RecordingSet object
a) Specifies whether to use a DSN or DSN-less connection b) Specifies which type of database is being used c) Specifies the type of driver to use, database format and filename d) First opens the initial connection to a database before giving any database information - correct answer
a) Specifies whether to use a DSN or DSN-less connection b) Specifies which type of database is being used c) Specifies the type of ODBC driver to use, database format and filename - correct answer d) Opens the initial connection to a database
6) There are two methods of connecting to an Access database. Which are they?
a) DNS, DNS-less b) DSN, DSN-less - correct answer c) ODBC, ADO d) OLEDB, ADO
9) What information can a connection string contain about the database you are trying to connect to?
a) Type of database b) Type of driver to use c) Location of database d) username e) All Of The Above - correct answer
10) What must your ASP code have if you are using the DSN method of connecting?
a) Connection object
11) What must your ASP code have if you are using the DSN-less method of connecting?
12) Which connection method is this code using?...Dim dbConn Set dbConn = Server.CreateObject("ADOBD.Connection") dbConn.Connectionstring = "DSN=Quiz; uid=login; pwd=password" dbConn.Open
13) Which connection method is this code using?.. Dim dbConn Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.Connectionstring = "DSN=Quiz; uid=login; pwd=password" dbConn.Open
14) Which connection method is this code using?..Dim dbConn Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.ConnectionString =
a) DSN b) DSN-less c) Both A and B d) Neither - the code is wrong - correct answer
15) Which connection method is this code using?..Dim dbConn Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _ "DBQ=C:\wwwroot\username\database.mdd" dbConn.Open
16) While it is important to properly open the connection to the database, it is equally important to close the connection. Leaving a connection open is the same as leaving your house with the door open...Dim dbConn Set dbConn = Server.CreateObject("ADODB.Con
a) Connection string, connection object, close connection string, close connection object b) Connection object, connection string, close connection string, close connection object - correct answer c) Connection object, connection string, close connection object, close connection string
ASP Server Side Include Quiz Result
Scrolldown to review your answer and view your score. Passing grade is 70% = C.
a) Allows you to include server executed code into any ASP application. b) Allows you to use one file in several different web pages. c) Allows you to use a piece of code more than once. d) All of the above - correct answer
3) Changing an include file will affect all the pages that link to it such as a navigation bar. Suppose you want certain pages to display a certain navigation
bar not available on other pages. Which is the BEST method to do this?
a) Write a separate include file for those unique pages. b) Forget the include file. It is easier to just put the unique menu in using HTML code. c) Have the include file test for the type of page and then print out the correct menu. - correct answer
5) Which of these page extensions WILL NOT recognize and execute an include file?
a) <% '#include virtual="banner.asp" %> b) <!-- #include virtual="banner.asp" --> - correct answer c) <-- #include virtual="banner.asp" -->
7) An include file that contains ASP code can be saved with a .inc extension.
8) Where would you place an include statement that has functions, subroutines and other configuration type of code?
a) At the beginning to keep the code neat and tidy. - correct answer b) Anywhere in the code where it is actually needed.
9) Lets say that your include file is a piece of code that will print out your navigation menu. Where would you place the include statement?
a) At the beginning to keep the code neat and tidy b) Anywhere in the code where it is actually needed. - correct answer
10) You are working on a file called index.asp and have put in the include statement below. Where is the include file actually located on the web server? ..<!-- #include file="config\functions.asp" -->
a) The include file is in the same directory as the file that is requesting it. - correct answer b) The include file is in another directory away from the file that is requesting it.
11) When viewing the source code of a web page, the JavaScript code can be seen and copied; thus, the code is not secure. Since JavaScript and include statements are both written with the same HTML delimiters: <!-- and -->, this also means that the include st
1) Which of the following languages can be used to write server side scripting in ASP.NET?
2) When an .aspx page is requested from the web server, the out put will be rendered to browser in following format.
3) The Asp.net server control, which provides an alternative way of displaying text on web page, is
a) < asp:label > - correct answer b) < asp:listitem > c) < asp:button >
6) What namespace does the Web page belong in the .NET Framework class hierarchy?
7) Which method do you invoke on the Data Adapter control to load your generated dataset?
c) Read( )
a) Add Tag prefix, Tag name b) Add Source, Tag prefix c) Add Src, Tagprefix, Tagname - correct answer
a) User controls are displayed correctly in the Visual Studio .NET Designer b) Custom controls are displayed correctly in VS.Net Designer - correct answer c) User and Custom controls are displayed correctly in the Visual Studio .NET Designer.
a) TagPrefix b) Name space of the dll that is referenced c) Assemblyname d) All of the above - correct answer
a) Scripting is separated from the HTML, Code is interpreted seperately b) Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed on server correct answer c) Code is separated from the HTML and interpreted Code is interpreted separately
a) Response.Output.Write() allows you to flush output b) Response.Output.Write() allows you to buffer output c) Response.Output.Write() allows you to write formatted output - correct answer d) Response.Output.Write() allows you to stream output
a) Implement application and session level events - correct answer b) Declare Global variables c) No use
a) IsPostBack is a method of System.UI.Web.Page class b) IsPostBack is a method of System.Web.UI.Page class c) IsPostBack is a readonly property of System.Web.UI.Page class - correct answer
18) The number of forms that can be added to a aspx page is.
a) 1 - correct answer b) 2 c) 3
d) More than 3
a) Session Objects b) Application Objects c) Viewstate d) All of the above - correct answer
20) Which property of the session object is used to set the local identifier?
24) Does the EnableViewState allows the page to save the users input on a form?
c) LISXML.dll d) SQLIIS.dll
26) What is the maximum number of cookies that can be allowed to a web site?
27) Select the control which does not have any visible interface.
e) Session.Exit
30) Which one of the following namespaces contains the definition for IdbConnection?
a) Creative Style Sheets b) Computer Style Sheets c) Cascading Style Sheets - correct answer d) Cascade Style Sheets
2) Where in an HTML document is the correct place to refer to an external style sheet?
a) In the <body> section b) At the end of the document c) At the top of the document d) In the <head> section - correct answer e) Between head and body
a) /* this is a comment */ - correct answer b) ' this is a comment c) // this is a comment // d) // this is a comment
11) What is the correct CSS syntax for making all the <p> elements bold?
c) style:bold d) p{font:bold}
13) How do you make each word in a text start with a capital letter?
16) How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20 pixels, The right border = 1pixel?
a) border-width:10px 20px 5px 1px b) border-width:10px 1px 5px 20px - correct answer c) border-width:10px 5px 20px 1px d) border-width:5px 20px 10px 1px
18) To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?
19) How do you make a list that lists its items with squares?
a) type: square b) list-style-type: square - correct answer c) list-type: square d) style-list: square
20) What is the correct HTML for referring to an external style sheet?
a) <link rel="stylesheet" type="text/css" href="mainstyle.css"> - correct answer b) <style src="mainstyle.css"> c) <stylesheet>mainstyle.css</stylesheet> d) <link url="stylesheet" type="text/css" href="mainstyle.css">
23) What is the correct CSS syntax for making all the <p> elements bold?
24) How do you make each word in a text start with a capital letter?
26) What are the three methods for using style sheets with a web page
a) Dreamweaver, GoLive or FrontPage b) Inline, embedded or document level and external - correct answer c) Handcoded, Generated or WYSIWYG
HTML Quiz Result
Scrolldown to review your answer and view your score. Passing grade is 70% = C.
a) It makes Michelle strong b) It highlights Michelle as being strong c) It will print out Michelle in bold font - correct answer
3) Which is correct?
a) <b>Click Here<b> b) <strong>Click Here<strong> c) <b>Click Here</b> - correct answer d) </strong>Click Here</strong>
a) DT b) LI c) DD d) DL - correct answer
6) _______are the HTML codes that control the apearance of the document contents
12) A_____structure starts with a general topic that includes link to more specific topics.
15) Because each computer differs in terms of what fonts it can display, each individual browser determines how text is to be displayed.
16) You do not have to connect to the internet to verify changes to a Web page on your computer.
a) Hypertext Mailing List b) Hypertext Mark Language c) Hypertext Markup Language - correct answer
20) Within the MAP tag, you use the AREA tag to specify the areas of the image that will act as a hotspot.
21) Can you create an e-mail form with auto responder using form action method=mailto:youdomainname.com?
24) Software programs, like your Web browser, use a mathemathical approach to define color.
25) If you want to increase the font size by 2 relative to the sorounding text, you enter +2 in the tag.
30) _____refers to the way the GIF file is saved by the graphics software.
d) echo("Hello World")
4) How do you write a conditional statement for executing some statements only if "i" is equal to 5?
5) How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?
a) Two. The "for" loop and the "while" loop - correct answer b) Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop c) One. The "for" loop
a) for (i = 0; i <= 5) b) for (i = 0; i <= 5; i++) - correct answer c) for i = 1 to 5 d) for (i <= 5; i++)
a) var txt = new Array(1:"tim",2:"shaq",3:"kobe") b) var txt = new Array="tim","shaq","kobe" c) var txt = new Array("tim","shaq","kobe") - correct answer
9) How do you round the number 8.25, to the nearest whole number?
d) rnd(8.25)
11) What is the correct JavaScript syntax for opening a new window called "window5" ?
a) window.status = "put your message here" - correct answer b) statusbar = "put your message here" c) status("put your message here") d) window.status("put your message here")
a) var myarray = new Array(); - correct answer b) var myarray = array new; c) var new Array() = myarray; d) var new array = myarray;
a) onmouseover and onmousedown b) onmousedown and onmouseout c) onmousedown and onmouseup - correct answer d) onmouseup and onmouseout
a) A method
17) Which property would you use to redirect visitor to another page?
1) You are a junior web designer. Your company assigns you to work on a JavaScript project. Which of the following are the advantages of using JavaScript for form validation?
a) Conservation of client CPU resources b) Increased validity of form submission c) Conservation of bandwidth d) Increase end-user satisfaction
2) Your company assigns you to work on a JavaScript project. With the DATE object, which of the following allows you to call a function based on an elapsed time?
3) You are working on a JavaScript project. What is used to restart the inner most loop?
4) You work on a JavaScript project. Which of the following correctly describe the relationships of JavaScript and "objects"?
a) JavaScript is Object-oriented b) JavaScript is Object-based - correct answer c) JavaScript is Object-driven d) JavaScript has no relationship with objects
5) You work on a JavaScript project. How do you prompt users with messages and at the same time requesting user inputs?
a) for ( increment; initialize; test) b) for ( initialize; test), increment c) for ( initialize; test; increment) - correct answer d) for ( test; initalize; increment)
7) In your JavaScript code, how do you find out which character occurs at the 5th position in a string "How are you"?
9) You want to design a form validation mechanism. Using string methods, which of the following are the steps involved ?
a) Check for the presence of certain characters b) Check the position of substrings c) Test the length of data d) Check the variable type of the strings e) Either ABC - correct answer
10) Which of the following is the minimum browser version that supports JavaScript
11) Under which of the following conditions will you need to include semi colons on a line of code?
a) When you have multiple statements on multiple lines b) When you have multiple statements on a line - correct answer c) When you have single statement on multiple lines d) When you have single statement on a line
a) Version 1.2 b) Version 1.1 c) Version 1.3 d) Version 1.4 e) All of the above - correct answer
13) Which of the following languages will you consider as being similar to JavaScript?
14) You plan the coding of your project. When must the object references be ready?
a) at run time - correct answer b) at compile time c) at debug time d) at code time
a) Often referred to as "persistent cookies" b) Often referred to as "persistent HTML" c) Small memory-resident pieces of information sent from a server to the client d) Small memory-resident pieces of information sent from a client to the server e) Either AB&C - correct answer
17) What are JavaScript relations with the underlying operating platform?
a) Platform dependent b) Platform linkage c) Platform independent - correct answer d) Platform binding
18) When you plan for the JavaScript variable names, the first character must be?
a) It is based on object creation b) It focuses on component building c) It focuses on logic flow d) It emphasis on SCRIPTING - correct answer
20) When authoring web page with Javascript, why should you explicitly include the window object into your codes?
a) this is a good practice - correct answer b) this is REQUIRED c) this ensures browser compatibility d) this ensures OS compatibility