CSS Designer

CSS describes how HTML elements are to be displayed on screen, It can control the layout of multiple web pages all at once. We have created a list for frequently asked Interview questions on CSS Designing. The questions are really helpful if you are seeking to start your career in Web designing.

Q.1 What does the following CSS selection indicates -- "p.top a { color: red; }"
Links to appear red in paragraphs having class named top
Q.2 What effect does happen on a element if, left and right margin is given 'auto' value
Available margin is split equally
Q.3 How is the space of an element measured, if specified by width property
Left inside padding to right inside padding edge
Q.4 What happens to text if 'auto' value is assigned to overflow property, to the element containing the text ?
If text overflows, it is clipped and scroll bar appears
Q.5 What does quirks mode refer to ?
Non-usage of DOCTYPE by older web pages
Q.6 What does the following CSS selection indicates -- "p.top a { color: red; }"
Links to appear red in paragraphs having class named top
Q.7 What effect does happen on a element if, left and right margin is given 'auto' value
Available margin is split equally
Q.8 What are the most popular website design languages and platforms?
The following are the most often used languages or platforms for web design: • HTML (Hypertext Markup Language) is a programming language that aids in the creation of the foundation template. • The pages are styled using CSS, which stands for Cascading Style Sheets. • The functionality is coded using JS (JavaScript). • PHP, or Personal Home Page, is a server-side scripting language.
Q.9 How is the space of an element measured, if specified by width property
Left inside padding to right inside padding edge
Q.10 What exactly is HTML?
HTML stands for Hypertext Markup Language, and it is the most widely used programming language for creating web pages and websites.
Q.11 What happens to text if 'auto' value is assigned to overflow property, to the element containing the text ?
If text overflows, it is clipped and scroll bar appears
Q.12 What role does CSS play in web design?
CSS, or Cascading Style Sheets, is required for any website's appearance and feel. They assist with the management of font styles, sizes, and colour combinations for web sites. Because web pages retrieve data and display it every time, a change in the CSS file will affect the entire website.
Q.13 What does quirks mode refer to ?
Non-usage of DOCTYPE by older web pages
Q.14 What is an external style sheet, and how does it work?
A document that contains the style information for many web pages or HTML files is known as an external style sheet. The LINK tag, which is found under the HEAD element, is usually used to link to external CSS. The items in this external CSS must have the appropriate extensions, such as style.css.
Q.15 Can you tell the difference between HTML elements and HTML tags?
HTML components communicate with the browser in order for text to be rendered. An element surrounded by angular brackets is referred to as an HTML tag. HTML tags are used to surround text and are always used in pairs.
Q.16 What is Semantic HTML, and how does it work?
The term "semantic HTML" refers to a coding style in which the tags express the semantics of the material being delivered. For instance, represents bold text, italics, and so on. Semantic HTML is just a bunch of formatting with no real structure or purpose.
Q.17 Explain what the term DOCTYPE means.
The word DOCTYPE informs a browser about the type of HTML that must be used on a web page. The browser, in turn, uses DOCTYPE to determine how a page should be presented. If you don't use DOCTYPE, the page can load in the wrong mode.
Q.18 What's the difference between Standard and Quirks Modes?
Quirks mode is a browser compatibility option that varies per browser. As a result, the appearance of the site varies depending on the browser. Standard mode is a display mode that is consistent across all browsers.
Q.19 What are some of the drawbacks of XHTML pages?
Browser support for XHTML is limited. XHTML cannot be parsed into XML by Internet Explorer or other browsers.
Q.20 How can you add comments to HTML code without them being picked up by the browser?
You must place comments between and—! when inserting them into HTML code. >.
Q.21 Determine whether you're linking to an image, an email address, or a website.
Use the tags to link to a picture. With the source attribute src in the opening tag, the picture must be contained in quotes.The anchor element is used to link to a hyperlink, and the destination URL is supplied in the attribute. Between anchor tags must be the text on which the hyperlink is placed. Hypertext reference is abbreviated as HREF.
Q.22 What could be causing the hyperlink or image to not appear properly?
A missing quotation, tag, bracket for href, alt, or src text can cause a hyperlink or image to not appear properly.
Q.23 What is the function of CSS in web design?
Cascading Style Sheets (CSS) are needed to give the look and feel of any website. They help in the management of font styles, sizes and color combinations that are required for web pages. One change in the CSS file will cause a change to the entire website because web pages retrieve data every time and then display it.
Q.24 What is the distinction between html and xhtml?
Extensible Hyper Text Markup Language (XHTML) is an acronym for Extensible Hyper Text Markup Language. HTML 4.01 and XHTML are nearly identical. XHTML is a more constrained and organised version of HTML. HTML that is defined as an XML application is known as XHTML. All of the major browsers support XHTML. Case is important in XHTML.
Q.25 How many types does css style sheet appear in?
In HTML, there are three different ways to write CSS: Style sheet for inline use. Style guide for internal use. Style sheet for external use.
Q.26 Who is in charge of web standards?
The World Wide Web Consortium (W3C) is a non-profit organisation (w3c Consortium).
Q.27 How can you make each word in a text start with a Capital Letter?
With this one in css —– text-transform: capitalize.
Q.28 Why do we use the word 'clear' in HTML?
After floating the position of other div> content, we utilise the clearance in HTML code to separate the content from one div> content.
Q.29 How many different graphics are there?
Graphics can be divided into two categories. Pixels are used in raster graphics (photoshop). Lines and Curves in Vector Graphics ( Illustrator).
Q.30 In Photoshop, what is a layer?
The object is held by a layer, which is a component. We can change the item in it without impacting the other material.
Q.31 What is gradient and how does it work? How do I use a gradient?
A gradient is the result of the blending of two or more colours.
Q.32 What Is Dhtml and how does it work?
HTML, XHTML, Javascript, Jquery, and CSS are all combined in DHTML. DHTML is a TERM that refers to the process of creating dynamic, interactive web pages.
Q.33 What Is Xml?
Extensible Markup Language (XML) is an acronym for extensible Markup Language. XML is a data transmission and storage format.
Q.34 What Is Cascading Style Sheets (CSS)?
Cascading Style Sheets (CSS) is an acronym for Cascading Style Sheets. Styles determine how HTML components are displayed. To solve a problem, styles were added to HTML 4.0. External Style Sheets can help you save time and effort. CSS files contain external style sheets.
Q.35 What Is Html5?
HTML5, XHTML, and the HTML DOM will all be replaced by HTML5. HTML5 is still in its infancy. Most current browsers, on the other hand, support HTML5.
Q.36 Is it true that HTML tags are case-sensitive?
There is no case sensitivity in HTML tags.
Q.37 How can layers be organized like in photoshop?
Yes, layers can be organised. For example, in the first layer, you can make a ball, and then in the second layer, you can make the background. However, you should lock all layers except the one you're working on, because unlocked layers will always be active (active means, if you want to drag the ball, background layers also will be affected).
Q.38 What is a prompt box and how does it work?
A prompt box provides a text box for the user to provide input.
Q.39 What is the difference between a confirmation box and an alert box?
The OK button is the only button displayed in an alert box, whereas the OK and cancel buttons are displayed in the Confirm box.
Q.40 What is negative infinity and what does it mean?
It's a JavaScript number that's calculated by dividing a negative number by zero.
Q.41 In Javascript, how do you convert numbers between different bases?
Use the parseInt() function, which accepts a string as the first argument and the base as the second. Use parseInt to convert hexadecimal 3F to decimal ("3F", 16).
Q.42 What are the different types of javascript?
Null, Undefined, Number, String, Boolean, Function, Object
Q.43 What are the five possible position values?
Position values include static, relative, absolute, fixed, and inherit.
Q.44 Is Cascading Style Sheets (CSS) case sensitive?
CSS (Cascading Style Sheets) does not care about case. Font families, image URLs, and other direct references to the style sheet, on the other hand, may be. The secret is that if you construct a document with an XML declaration and an XHTML doctype, some browsers will make the CSS class names case sensitive. It's best to avoid naming classes where the only difference is the case, such as: div.myclass... div.myClass... If you accidentally remove the DOCTYPE or XML declaration from your pages, the last instance of the style will be applied, regardless of case.
Q.45 What is an external style sheet, and how do I use it? What is the best way to link?
A style sheet is a template, document, or file that contains style information that can be connected to any number of HTML documents. This is a very handy approach of formatting and restyling the complete site by modifying only one file. The LINK element within the HEAD element is used to link the file to HTML documents. Style information must be stored in files with the extension.css, such as style.css. HEAD > LINK REL=STYLESHEET HREF="style.css" TYPE="text/css"> / HEAD> LINK REL=STYLESHEET HREF="style.css" TYPE="text/css">
Q.46 What is the best way to add scrolling text to my page?
Keep in mind that scrolling text isn't supported by all browsers. However, to accomplish this, create a tag similar to the one shown below. /marquee>THIS WOULD SCROLL The above example would result in the scrolling text below. If your browser allows scrolling text, the example below should scroll. More examples can be found on our main HTML page, which contains a list of the most common HTML instructions.
Q.47 How do I add a picture to my web pages as a background?
As seen below, point the body background to the name of the image you want to use as the backdrop. After your / head> tag, this body line should be the first line. background="picture.gif" > body You can also have the background image fixed so that it doesn't move when you use the browser's scroll bar. Add the BGPROPERTIES tag as indicated below to accomplish this. bgproperties="fixed" body background="picture.gif"
Q.48 Why Inheritance in CSS?
The inherit CSS term causes the chosen element to inherit the calculated property value from its parent element. It works on any CSS property, including the all CSS shorthand. This confirms the default behaviour for inherited properties and is only required to override another rule.
Q.49 What is Specificity in CSS?
If two or more CSS rules point to the same element and are in dispute, the browser uses some rules to determine which one is the more specific. Consider specificity as a score or ranking that affects which style declarations are applied to an element in the end. The global selection (*) has a low level of specificity, whereas ID selectors have a high level of specificity!
Q.50 Explain Specificity Hierarchy.
Every selector has a place in the hierarchy of specificity. A selector's specificity level can be classified into four categories: Inline styles are styles that are applied directly to the element being styled. h1 style="color: #ffffff;">, for example. IDs - An ID, such as #navbar, is a unique identifier for page elements. .classes, [attributes], and pseudo-classes such as :hover, :focus, and others are included in this category. This category comprises element names and pseudo-elements like h1, div, :before, and :after.
Q.51 What does quirks mode refer to?
Non-usage of DOCTYPE by older web pages
Get Govt. Certified Take Test