Question 1 Which of the Following HTML Elements Specifies Its

Question 1 Which of the Following HTML Elements Specifies Its

Question 1 Which of the following HTML elements specifies its meaning to both the web browser and developer? Semantic elements specify their meaning to both the web browser and developer. Tags such as <aside>, <article>, <section>, and <header> are some of the semantic elements. Question 2 Which of the following defines the script tag? In HTML, the script tag either holds programming scripts, or it points to an external script file through the src attribute. Question 3 What should be the first statement of an HTML5 document? The <!DOCTYPE html> should be the first statement of an HTML5 document, as it specifies which version of HTML you're using. Question 4 Which of the following HTML tags is a stand-alone tag? The <br> tag is a stand-alone tag, as it does not have any closing or companion tag. Question 5 You are creating a home page for XYZ Airlines. The page will use JavaScript. If a browser does not support JavaScript, then a "Your browser does not support JavaScript!" message must be displayed. Which of the following HTML elements will you use to achieve this? The noscript tag specifies an alternate or fallback content for users who have disabled scripts in their browser or have a browser that doesn't support script. It can be used in both the <head> and <body> tags. Question 6 What is the full form of XHTML? The full form of XHTML is Extensible HyperText Markup Language. Question 7 During the planning phase of the project, you have listed some keywords related to your webpage that will be embedded to the webpage in order to increase its relevance and determine its position in the searched list. Which of the following code segments will you use to accomplish this task? As per the scenario, the <meta> tag will be used to embed the keywords related to the webpage along with the content and name attributes because it helps the search engines to increase the relevance and position of the webpage in the searched list by providing the keywords. Here's the syntax for using the <meta> tag with the content and name attributes: <meta name="keywords" content="metadata"> Question 8 You are building a cooking Web site, and need to create a section which contains the stepwise procedure for preparing a chocolate cake along with the list of its ingredients. Which of the following groups of elements will you use to achieve this? As per the scenario, an unordered list will be used to create a list of ingredients, which are required for a chocolate cake because listing of ingredients is not a stepwise or a sequential process. An ordered list will be required to create a list of steps to follow while cooking because it is a stepwise or a sequential process. Hence, the ul and ol elements will be used for the list of ingredients to buy and list of steps to follow, respectively. Question 9 You manage the Web site for your school’s library and decided to mark books that are new with class=new and books that have been borrowed with class=borrowed. How would you mark a book that was both new and borrowed? As per the scenario, the <li> tag will be used to create a list of books. The class attribute will be used with the list to categorize books in different classes because it specifies the class of an element. In order to define multiple class (new, borrowed) for a single book, the space-separated list of class names will be specified as a value in the class attribute. Here's the syntax of the class attribute along with the <li> element: <li class="className1 className2 className3"> Question 10 The code for your Web site’s home page is written in HTML and you want to include remarks for some code segments such that other developers viewing the code will understand how it works. These remarks must be invisible to visitors of your site. Which of the following markups illustrates the correct syntax for these remarks? In HTML, comments are added to the code as remarks for other developers or anyone who will view the source code but are not visible on the Web site, when the HTML document is rendered by a browser. Syntax for adding comments in the HTML code is shown below: <!–– Comment goes here––> Question 11 Which of the following code segments will you use to display the given list? In the given image, the list-style-image property will be used because the list is displayed with an image as the list item marker. The font-style property is used to specify the style of the font such as italic, normal, and oblique. The font-weight property is used to specify the weight of the font such as bold, thick, and so on. The element (ul) selector will be used to define the style for the list. Here's the syntax for defining the style of the given list: ul { list-style-image: url('img.png'); font-style: italic; font-weight: bold; } Question 12 How many levels of headings are there in HTML? There are six levels of headings in HTML such as <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. h1 is the most important or the highest level and h6 is the least. Question 13 Which of the following tags is placed within a <head> tag of an HTML document? The following tags are placed within a <head> tag of an HTML document: • <title> • <meta> Question 14 How does a user specify width of the page such that it will behave according to the width of the device in HTML? In HTML, when the content attribute of the meta tag contains the value width=device-width, it will specify the width of the page such that it will behave according to the width of the device. Question 15 How does one instruct the browser to control the page's scaling and dimensions within a meta tag? A <meta> viewport element instructs the browser to control the page's scaling and dimensions, and it is declared by using name="viewport" within a meta tag. Question 16 John is creating a Web site for his company. The Web site must be able to prevent itself from default zooming and maintain its original quality if the user changes its orientation. Which of the following code segments will you use to achieve this? The meta viewport element along with its properties will be used because it instructs the browser on how to control the page's scaling. It contains two attributes name and content. The name attribute specifies that the <meta> tag is defining a viewport. The content attribute defines the width and initial- scale properties. The initial-scale property controls the initial zoom level such that 1 viewport pixel equals 1 CSS pixel. This property helps the Web site to prevent itself from default zooming and maintain its original quality if the user changes its orientation. Here's the syntax of the meta element along with its attributes: <meta name="viewport" content="width=device-width, initial- scale=1.0"> Question 17 You are designing a payment page for an e-commerce Web site. The page must refresh itself automatically after every 5 minutes for security purposes. Which of the following code segments will you use? The http-equiv attribute will be used because it provides an HTTP header for the information/value of the content attribute. The content attribute defines a time interval for the document to refresh itself and gives the value associated with the http- equiv or name attribute. Syntax for the http- equiv attribute along with the content attribute: <meta http-equiv="refresh" content="Time in seconds"> Question 18 Which path specifies that the file is located one level up from the current directory? The href="../filename.html" path specifies that the file is located one level up from the current directory. Question 19 Which of the following paths is an absolute path? The /directory/filename is an absolute path, as an absolute file path starts with a forward slash and then is succeeded by all the directories from the top level to the file you are linking. Question 20 Considering the following code snippet, which of the following directories contains the trombone.jpg file? The path for trombone.jpg file is given as Desktop/ Images/Mandolin/trombone.jpg, which is an absolute path, as it defines the complete location of the file trombone.jpg, starting from the root directory (Desktop) to the end directory (Mandolin) with the other sub directory (Images). Hence, the trombone.jpg file is contained in the end directory (Mandolin). .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us