What is the <map> element used for?
(a) to specify clickable areas on <img>, <svg>, or <convas> elements.
(b) to show a map to a location .
(c) to map form labels to from fields .
(d) to specify clickable areas on <img> element
answare : (d)
What is the purpose of the code below?
<!--[if IE]><link href=”style.css” rel=”stylesheet”><![endif]-->
(a) If the web browser in Internet Explorer 9 or earlier, it loads a style sheet called styles.css
(b) If the web browser is Internet Explorer 11 or earlier, it loads a style sheet called styles.css
(c) Loads a style sheets called styles.css
(d) If the web browser is Internet Explorer, it loads a style sheets.css
What is the purpose of the class attribute?
(a) Classes allow CSS to select specific elements on the page. You may list only one class name per class attribute.
(b) Classes allow CSS and JavaScript to select specific elements on the page. you may list only one class name per class attribute.
(c) Classes allow CSS to select specific elements on the page. you may list as many class names within the class attribute as you wish, separated by spaces.
(d) Classes allow CSS and JavaScript to select specific elements on the page. you may list as many class names within the class attribute as you wise, separated by spaces.
(a) to specify clickable areas on <img>, <svg>, or <convas> elements.
(b) to show a map to a location .
(c) to map form labels to from fields .
(d) to specify clickable areas on <img> element
answare : (d)
What is the purpose of the code below?
<!--[if IE]><link href=”style.css” rel=”stylesheet”><![endif]-->
(a) If the web browser in Internet Explorer 9 or earlier, it loads a style sheet called styles.css
(b) If the web browser is Internet Explorer 11 or earlier, it loads a style sheet called styles.css
(c) Loads a style sheets called styles.css
(d) If the web browser is Internet Explorer, it loads a style sheets.css
What is the purpose of the class attribute?
(a) Classes allow CSS to select specific elements on the page. You may list only one class name per class attribute.
(b) Classes allow CSS and JavaScript to select specific elements on the page. you may list only one class name per class attribute.
(c) Classes allow CSS to select specific elements on the page. you may list as many class names within the class attribute as you wish, separated by spaces.
(d) Classes allow CSS and JavaScript to select specific elements on the page. you may list as many class names within the class attribute as you wise, separated by spaces.
Q1: What is an iframe and how it works?
Add to PDF Entry
Answer
An iframe is an HTML document which can be embedded inside another HTML page.
Example:
<iframe src="https://github.com" height="300px" width="300px"></iframe>
Q2: Explain meta tags in HTML
Add to PDF Entry
Answer
Meta tags always go inside head tag of the HTML page
Meta tags is always passed as name/value pairs
Meta tags are not displayed on the page but intended for the browser
Meta tags can contain information about character encoding, description, title of the document etc,
Example:
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="I am a web page with description">
<title>Home Page</title>
</head>
<body>
</body>
</html>
Q3: What is the purpose of the alt attribute on images?
Add to PDF Entry
Answer
The alt attribute provides alternative information for an image if a user cannot view it. The alt attribute should be used to describe any images except those which only serve a decorative purposes, in which case it should be left empty.
Q4: What is the difference between span and div?
Add to PDF Junior
Answer
div is a block element
span is inline element
For bonus points, you could point out that it’s illegal to place a block element inside an inline element, and that while div can have a p tag, and a p tag can have a span, it is not possible for span to have a div or p tag inside.
Source: thatjsdude.com
Q5: How Can I Get Indexed Better by Search Engines?
Add to PDF Junior
Answer
It is possible to get indexed better by placing the following 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">
Both may contain up to 1022 characters. If a keyword is used more than 7 times, the keywords tag will be ignored altogether. Also, you cannot put markup (other than entities) in the description or keywords list.
Source: freejavaguide.com
Q6: What were some of the key goals and motivations for the HTML5 specification?
Add to PDF Junior
Answer
HTML5 was designed to replace HTML 4, XHTML, and the HTML DOM Level 2. The key goals and motivations behind the HTML5 specification were to:
Deliver rich content (graphics, movies, etc.) without the need for additional plugins, such as Flash.
Provide better semantic support for web page structure through new structural element tags.
Provide a stricter parsing standard to simplify error handling, ensure more consistent cross-browser behaviour, and simplify compatibility with documents written to older standards.
Provide better cross-platform support whether running on a PC, Tablet, or Smartphone.
Source: toptal.com
Q7: How can you highlight text in HTML?
Add to PDF Junior
Answer
If you are working with an HTML5 page, the <mark> tag can be a quick and easy way of highlighting or marking text on a page:
<mark>highlighted text</mark>
To highlight text with just HTML code and support for all browsers, set the background-color style, as shown in the example below, using the HTML tag.
<span style="background-color: #FFFF00">Yellow text.</span>
Source: computerhope.com
Q8: Briefly describe the correct usage of the following HTML5 semantic elements: <header>, <article>, <section>, <footer>
Add to PDF Junior
Q9: What is Character Encoding?
Add to PDF Junior
Answer
To display an HTML page correctly, a web browser must know which character set (character encoding) to use. This is specified in the tag:
HTML4:
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
HTML5:
<meta charset="UTF-8">
Source: w3schools.com
Q10: What is a self closing tag?
Add to PDF Junior
Answer
In HTML5 it is not strictly necessary to close certain HTML tags. The tags that aren’t required to have specific closing tags are called “self closing” tags.
An example of a self closing tag is something like a line break (<br />) or the meta tag (<meta>). This means that the following are both acceptable:
<meta charset="UTF-8">
...
<meta charset="UTF-8" />
Source: blog.teamtreehouse.com
Q11: hat's the difference between an "attribute" and a "property" in HTML?
Add to PDF Junior
Answer
Attributes are defined on the HTML markup but properties are defined on the DOM. To illustrate the difference, imagine we have this text field in our HTML: <input type="text" value="Hello">.
const input = document.querySelector('input');
console.log(input.getAttribute('value')); // Hello
console.log(input.value); // Hello
But after you change the value of the text field by adding "World!" to it, this becomes:
console.log(input.getAttribute('value')); // Hello
console.log(input.value); // Hello World!
Source: github.com/yangshun
0 Comments