Computer Knowledge

Markup and Web Languages

1,701 Questions

Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.

HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility

Markup and Web Languages Questions

Multiple choice php
  1. show_errors, enable

  2. show_errors, show

  3. register_globals, enhance

  4. register_globals, inject

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The 'register_globals' directive (deprecated and removed in modern PHP) automatically created global variables from EGPCS (Environment, GET, POST, Cookie, Server) variables. This 'injected' user-provided data directly into the script's global scope, creating significant security vulnerabilities.

Multiple choice php
  1. print substr($text, strchr($text, ':'));
  2. print substr($text, strchr($text, ':') 1);
  3. print substr($text, strpos($text, ':') 1);
  4. print substr($text, strpos($text, ':') 2);
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The string is assumed to be 'Content-Type: text/xml'. Option D uses strpos to find the colon at index 13, then adds 2, skipping the colon and space to start at 't'. The output would be 'text/xml'. Option C only adds 1 (starts with space). Option A uses strchr which returns the rest of the string.

Multiple choice java
  1. @author

  2. {@link}

  3. @serialField

  4. @arg

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To answer this question, the user needs to know about Javadoc tags and their purpose in documenting Java code.

Now, let's go through each option and explain why it is right or wrong:

A. @author: This is a valid Javadoc tag that is used to indicate the author of the code or the documentation.

B. {@link}: This is a valid Javadoc tag that is used to create a hyperlink to another class, method, or field in the code documentation.

C. @serialField: This is a valid Javadoc tag that is used to document the fields of a serializable class.

D. @arg: This is not a valid Javadoc tag. The correct Javadoc tag for documenting method arguments is @param.

Therefore, the answer is:

The Answer is: D. @arg

Multiple choice java
  1. XML imposes important limitations on the receiving program or tool.

  2. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.

  3. XML tags offer an extra level of security

  4. XML tags specify to the receiving program or tool exactly how to format and display the data.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XML uses custom tags to describe data structure and meaning, acting as self-documenting metadata. The receiving program parses these tags to understand the data's schema and process it appropriately - different tags trigger different handling logic. Option A is incorrect because XML is designed to be flexible, not limiting. Option C is wrong - XML itself provides no security. Option D is also incorrect - XML describes data structure, not presentation details (that's what XSLT or CSS are for).

Multiple choice java
  1. A loop can begin in one Scriptlet and end in another

  2. Statements in Scriptlets should follow Java Syntax

  3. Semicolon is needed at the end of each statement in a Scriptlet

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

JSP scriptlets contain Java code fragments. While loop structures can span multiple scriptlet blocks because the JSP container merges them into a single service method, and statements within them must follow standard Java syntax (including semicolons). Therefore, all statements A, B, and C are correct regarding the legal usage of scriptlets.

Multiple choice .net
  1. only hold string values.

  2. only hold integer values.

  3. only hold Boolean values.

  4. only hold controls.

  5. hold any data defined by the programmer.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

To solve this question, the user needs to understand the concept of the Tag property and its purpose. The Tag property is a commonly used property in many programming languages and frameworks. It allows the programmer to associate any custom data with a control or object.

Now, let's go through each option and explain why it is right or wrong:

A. only hold string values: This option is incorrect. The Tag property is not limited to holding only string values. It can hold any type of data defined by the programmer.

B. only hold integer values: This option is incorrect. Similar to option A, the Tag property is not limited to holding only integer values. It can hold any type of data.

C. only hold Boolean values: This option is incorrect. The Tag property is not limited to holding only Boolean values. It can hold any type of data.

D. only hold controls: This option is incorrect. The Tag property is not limited to holding only controls. It can hold any type of data.

E. hold any data defined by the programmer: This option is correct. The Tag property can hold any data defined by the programmer, regardless of its type.

Therefore, the correct answer is:

E. hold any data defined by the programmer.

Multiple choice .net
  1. Huge Makeup Language.

  2. Huge Text Makeup Language.

  3. Hypertext Makeup Language.

  4. Hypertext Markup Language.

  5. None of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

HTML (HyperText Markup Language) is the standard markup language for creating web pages. 'HyperText' refers to links that connect pages, and 'Markup Language' means it uses tags to define document structure and formatting.

Multiple choice .net
  1. ( )

  2. < >

  3. [ ]

  4. { }

  5. None of the above.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To solve this question, the user needs to have knowledge of HTML and the syntax used for HTML tags.

The correct answer is:

B. < >

HTML tags are enclosed by angle brackets (< >). The opening tag is represented by , and the closing tag is represented by . The content between the opening and closing tags is affected by the tag.

A. ( ): Parentheses are not used to enclose HTML tags. They have other purposes in programming and mathematics.

C. [ ]: Square brackets are also not used to enclose HTML tags. They are used in other programming contexts, such as arrays or character classes in regular expressions.

D. { }: Curly braces are not used to enclose HTML tags. They have various uses in programming languages, such as defining blocks of code or representing sets in mathematics.

E. None of the above: This option is incorrect because, as explained above, HTML tags are enclosed by angle brackets (< >).

The Answer is: B. < >

Multiple choice .net
  1. !

  2. /

  3. \

  4. ?

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

HTML end tags use a forward slash (/) before the tag name to indicate the closing of an element, such as for a paragraph or for a division. This distinguishes them from start tags and follows SGML syntax conventions.

Multiple choice .net
  1. B

  2. center

  3. HR

  4. I

  5. U

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The HR (Horizontal Rule) tag is a void element in HTML, meaning it doesn't require a separate closing tag. It's written as


(or
in XHTML) and renders a thematic break line. Tags like B (bold), I (italic), and U (underline) require closing tags.

Multiple choice .net
  1. An HTML document can be displayed in any internet browser.

  2. HTML is used to change the formatting of the displayed text.

  3. An HTML document is created with an HTML development editor.

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Statement C is not true because HTML documents can be created with any plain text editor (Notepad, TextEdit, VS Code) - a specialized HTML editor is not required. Statements A and B are true: HTML documents display in any browser and HTML controls text formatting.

Multiple choice .net
  1. A href

  2. A ref

  3. An href

  4. An ref

  5. href

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To create a link to another browser page in HTML, the user needs to use the <a> tag, also known as the anchor tag. This tag is used to define a hyperlink, which allows users to navigate to another web page.

Now let's go through each option and explain why it is right or wrong:

A. A href: This option is incorrect. The correct HTML tag for creating a link is </a><a> and not </a><a href="">. The href attribute is used within the </a><a> tag to specify the destination URL of the link.

B. A ref: This option is incorrect. The correct HTML tag for creating a link is </a><a>, not </a><a>. The ref attribute does not exist within the </a><a> tag.

C. An href: This option is incorrect. The correct HTML tag for creating a link is </a><a>, not `. Thehrefattribute is used within the` tag to specify the destination URL of the link.

D. An ref: This option is incorrect. The correct HTML tag for creating a link is </a><a>, not `. Therefattribute does not exist within the` tag.

E. href: This option is incorrect. The `tag does not exist in HTML. Thehrefattribute is used within the` tag to specify the destination URL of the link.

The correct answer is A. </a><a href="">. The </a><a> tag, when used with the href attribute, creates a hyperlink to another browser page.

Let me know if you have any other questions!

Multiple choice .net
  1. Notepad

  2. Word

  3. Visual Studio .NET

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

HTML is a plain-text markup language. It can be authored in simple text editors like Notepad, word processors like Word (saving as HTML), or integrated development environments like Visual Studio .NET. Any software capable of outputting text can create an HTML page.

Multiple choice .net
  1. <@

  2. <#

  3. <$
  4. <%

  5. <&

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

ASP.NET uses <% and %> delimiters to mark code blocks in server-side pages. These are called 'render blocks' and can contain C# or VB.NET code that executes on the server. The @ symbol is for directives (# is old syntax), $ is not used in ASP.NET (though used in other template engines).