Exam paper Flashcards

1
Q

Briefly explain jquery and disadvantage of jquery

A

jQuery is a JavaScript library that simplifies HTML document traversal, event handling, and animation for web development.

It provides a simpler way to interact with HTML documents and makes it easier to add interactivity to websites.

One disadvantage of jQuery is that it may not be necessary for all projects, especially as modern browsers have implemented many of the features that jQuery was created to provide. Additionally, using jQuery can add to the page load time, which can negatively impact website performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the give tag and how to use it to divide a page

A

The “div” tag is an HTML element used to divide a web page into sections or to group elements together. It is a container that can hold other HTML elements such as text, images, forms, and other tags.

To use the “div” tag to divide a page, you would place the opening tag “<div>” at the beginning of the section you want to create and the closing tag “</div>” at the end. Inside the opening and closing tags, you would add the content you want to place in that section of the page. You can then apply styling or formatting to the “div” element to change its appearance or position on the page.

For example, you might use a “div” element to create a header section at the top of the page that contains the site logo and navigation links, and another “div” element to create a footer section at the bottom of the page that contains copyright information and additional links. This helps to organize the content on the page and make it easier for users to navigate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

write the JavaScript validation code to add calendar in html code
simple word

A

<input></input>

function validateDate() {
var inputDate = document.getElementById(“myDate”).value;
var selectedDate = new Date(inputDate);
var today = new Date();

if (selectedDate < today) {
alert(“Please select a future date.”);
return false;
} else {
return true;
}
}

<form>
<!-- form elements here -->
<input></input>
</form>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what to do understand by statically awesome style sheet

A

“Statically Awesome Style Sheets” (Sass) is a preprocessor scripting language that extends the capabilities of CSS (Cascading Style Sheets) to make it more powerful and efficient.

it allows you to use variables, functions, nesting, and other programming concepts to write more organized and reusable CSS code. It enables you to write CSS in a more modular way and reduces the amount of redundant code you need to write.

you can define variables for colors, font sizes, and other values and reuse them throughout your CSS code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

briefly define less in css

A

It enables you to write more organized and maintainable CSS code, while also making it more efficient and reusable.

you can define variables for colors, font sizes, and other values and reuse them throughout your CSS code.

Less is compiled into regular CSS code that can be read by web browsers, and it can be used with any existing CSS code.

it enables them to write more modular, reusable, and scalable CSS code, and it helps to reduce the amount of code they need to write.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

briefly explain steps when making a hyperlinks homepage about us likely in a red navigation bar without underline and without affecting any other homepage of the page

A

<a>About Us</a>
a {
text-decoration: none;
}
a[href=”about-us.html”] {
color: red;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

benefits of using id and class sectors

A

IDs and classes are used in HTML and CSS to identify and style specific elements on a web page.

Reusability: By assigning IDs and classes to elements, you can reuse the same styles across multiple elements on your web page or even across different pages on your website. This makes your CSS code more efficient and reduces the amount of redundant code you need to write.

Maintenance: IDs and classes can make your code easier to maintain because they provide a clear and logical structure to your HTML and CSS files.

Flexibility: IDs and classes provide a flexible way to apply styles to your web page because you can apply styles to multiple elements at once, or target individual elements with specific styles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly