What are different ways to integrate a CSS into a Web page?
Correct Answer
There are three ways to integrate CSS into a Web page 1 Inline: HTML elements may have CSS applied to them via the STYLE attribute 2 Embedded: By placing the code in a STYLE element within the HEAD element 3 Linked/ Imported: Place the CSS in an external file and link it via a link element
Technology problems
Search Results
1. Differentiate different types of Doctypes from one another.
Correct Answer: Doctype helps the web browser to correctly render the web pages There are different types of Doctype that are available and they are as follows: => Strict Doctype: it consists of all the HTML elements and it is also known as DTD (Document type definition) but it doesn't include the presentational and deprecated elements ie font, center, etc Framesets related elements are also not allowed in this For example: => Transitional Doctype: it consists of all the HTML elements and attributes It is also known as DTD (Document type definition) It includes the presentational and deprecated elements ie font, center, etc Framesets related elements are also not allowed in this For example: => Frameset Doctype: it consists of all the HTML elements and attributes It is also known as DTD (Document type definition) It includes the presentational and deprecated elements ie font, center, etc Framesets related elements are also allowed in this For example:
Correct Answer: Doctype tag is not a HTML tag, it is just an instruction that is passed to the web browser to check for the information that is being provided by the markup language in which the page is written Doctype is sometimes referred as Document type definition (DTD) that describes some rules that has to be followed while writing the markup language so to make the web browser understand the language and the content correctly Doctype is very important to be placed in the beginning of the HTML and before the tag to allow easy rendering of the pages that are used
Correct Answer: The differences between HTML and HTML5 are: - Document of HTML is very large as compare to the HTML5 - Audio and Video tags are not present in HTML whereas HTML5 contains audio and video tags - Vector technology is not integral part of HTML whereas HTML5 Vector technology is the integral part of it - HTML supported by all old browsers whereas HTML5 is supported by new browser - In HTML web sockets are not available whereas in HTML5 Full duplex communication channel is present
5. What is the Use of SPAN in HTML and give one example?
Correct Answer: The tag is used to group inline-elements in a document The tag provides no visual change by itself The tag provides a way to add a hook to a part of a text or a part of a document EX :
Correct Answer: - Basically it is a string that identifies the elements to which a particular declaration or set of declarations will apply - It can also be referred to as a link between the HTML document and the style sheet - It is equivalent of HTML elements For example : A {text-indent: 12pt} Here, the selector is A, which is called as type selector
Correct Answer: - A web page with large number of images takes a longer time to load This is because each image separately sends out a http request - The concept of CSS sprite helps in reducing this loading time for a web page by combining various small images into one image This reduces the numbers of http request and hence the loading time
Correct Answer: CSS consists of two types of CSS rules, first is for ruleset which identifies the style and the selector It combines the style and the selector Ruleset is a combination of CSS rules, for example: h1{text-color: 15pt;}, where this is the CSS rule Ruleset is selector + declaration for example: h1 + {text-color: 15pt;}
9. What is the difference between class selector and ID selector?
Correct Answer: - Class selector can be given to an overall block This is sometimes termed as block element as well, whereas ID selector identifies a unique name and a style for a specific element - ID selector declares the style for only one particular element which can be differentiated from other element, whereas Class selector is being given for the whole complete block
Correct Answer: Pseudo elements allow the use of the part of element and not the element itself They are applied to block level element, which is used for the complete block for which the CSS is being written This allow the subpart of an element to be styled like paragraphs and headings For example: selector:pseudo-element {property:value;} p: first-line {text-transform: lowercase;} It adds the style to the first line of the code in the paragraph