Web_Tech_Study_Guide
Web_Tech_Study_Guide
This guide summarizes key concepts from selected programs, covering HTML, CSS, JavaScript,
jQuery, and Ajax. Use this guide to familiarize yourself with web development basics.
---
1. **HTML Structure**:
2. **Text Elements**:
- Paragraphs: `<p>`.
3. **Styles**:
- Bold: `<b>`.
- Italic: `<i>`.
- Underline: `<u>`.
4. **Special Features**:
1. **Table Structure**:
- `<tr>` for rows, `<th>` for headers, and `<td>` for data cells.
2. **Attributes**:
3. **CSS Styling**:
---
1. **CSS Selectors**:
- **Child Selector**: `div > p {}` applies to direct child `<p>` tags.
2. **CSS Properties**:
---
1. **Form Structure**:
2. **Styling Forms**:
---
1. **Semantic Tags**:
- Header: `<header>`.
- Navigation: `<nav>`.
- Sidebar: `<aside>`.
- Footer: `<footer>`.
2. **Additional Elements**:
---
1. **JavaScript Integration**:
2. **Functions**:
- Example:
```javascript
function calculate(operation) {
let result;
switch (operation) {
document.getElementById('result').textContent = result;
}
```
3. **Event Handling**:
---
1. **jQuery Basics**:
2. **Features**:
- Append Content:
```javascript
$('#appendButton').click(() => {
$('#list').append('<li>New Item</li>');
});
```
- Animate Elements:
```javascript
$('#animateButton').click(() => {
$('.animated-div').animate({
width: '200px',
height: '200px'
}, 1000, function() {
$(this).css('background-color', '#ff5733');
});
});
```
---
1. **AJAX Basics**:
- Using `XMLHttpRequest`:
```javascript
xhr.onload = () => {
document.getElementById('contentJS').textContent = xhr.responseText;
};
xhr.send();
```
2. **jQuery AJAX**:
```javascript
$.ajax({
url: 'file.txt',
});
```
- Parse JSON:
```javascript
console.log(data.name);
```
- `getJSON`:
```javascript
$('#contentJSON').html(`<p>Name: ${data.name}</p>`);
});
```
---