REVATURE INTERVIEW QUESTIONS AND ANSWERS| LATEST UPDATE 100% SOLVED
Name and explain 5 tags in HTML. - <!DOCTYPE html> Defines document to be HTML5
- <html> The root element of an HTML page
- <head> Contains meta information about the document
- <title> Specifies title for the document
- <body> Contains visible page content
- <h1> Defines a large heading
- <p> Defines a paragraph
- <div> Defines a section in a document
- <header> Defines a header for a document or section
Define HTML links and syntax. HTML links are hyperlinks that jump to another document
when clicked. when the mouse is over a link, the mouse arrow will turn into a little hand.
Syntax:
<a href="url">link text</a>
Define HTML images and syntax. images are defined with <img> tag with no closing tag, src
attribute specifies image URL, and alt attribute specifies image description
Syntax:
<img src="picName.jpg alt="picCaption">
,What are the two types of HTML lists? Describe syntax for each. - Ordered List: numbered
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
- Unordered List: bullet points
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
What is CSS, when and why do you use it? Cascading Style Sheets.
- describes how HTML elements are to be displayed
- controls the layout of multiple web pages at once, saves work
- external stylesheets are stored in css files
How can CSS be added to HTML? Describe syntax too. - Inline: using style attribute in HTML
elements
<h1 style="color:blue;">Blue Heading</h1>
- Internal: using a <style> element in the <head> section
, <head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
- External: using an external CSS file
<head>
<link rel="stylesheet" href="styles.css">
</head>
What is JavaScript, when and why do you use it? - the programming language for web pages
- used to update and change both HTML and CSS
- calculates, manipulates, and validates data
Describe the syntax of some JavaScript Variables. - var x, y; // How to declare variables
- x = 5; y = 6; // How to assign values
- z = x + y; // How to compute values
- Strings are text, written within double or single quotes
- '==' operator tests for abstract equality
Name and explain 5 tags in HTML. - <!DOCTYPE html> Defines document to be HTML5
- <html> The root element of an HTML page
- <head> Contains meta information about the document
- <title> Specifies title for the document
- <body> Contains visible page content
- <h1> Defines a large heading
- <p> Defines a paragraph
- <div> Defines a section in a document
- <header> Defines a header for a document or section
Define HTML links and syntax. HTML links are hyperlinks that jump to another document
when clicked. when the mouse is over a link, the mouse arrow will turn into a little hand.
Syntax:
<a href="url">link text</a>
Define HTML images and syntax. images are defined with <img> tag with no closing tag, src
attribute specifies image URL, and alt attribute specifies image description
Syntax:
<img src="picName.jpg alt="picCaption">
,What are the two types of HTML lists? Describe syntax for each. - Ordered List: numbered
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
- Unordered List: bullet points
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
What is CSS, when and why do you use it? Cascading Style Sheets.
- describes how HTML elements are to be displayed
- controls the layout of multiple web pages at once, saves work
- external stylesheets are stored in css files
How can CSS be added to HTML? Describe syntax too. - Inline: using style attribute in HTML
elements
<h1 style="color:blue;">Blue Heading</h1>
- Internal: using a <style> element in the <head> section
, <head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
- External: using an external CSS file
<head>
<link rel="stylesheet" href="styles.css">
</head>
What is JavaScript, when and why do you use it? - the programming language for web pages
- used to update and change both HTML and CSS
- calculates, manipulates, and validates data
Describe the syntax of some JavaScript Variables. - var x, y; // How to declare variables
- x = 5; y = 6; // How to assign values
- z = x + y; // How to compute values
- Strings are text, written within double or single quotes
- '==' operator tests for abstract equality