HTML starter notes for IT students, Hausarbeiten von IT-Management

The document was designed to help students who are taking IT with the aim of upgrading to computer science or even upskilling

Art: Hausarbeiten

2023/2024

Hochgeladen am 07.01.2025

my-rechdiary
my-rechdiary 🇩🇪

1 dokument

1 / 3

Toggle sidebar

Diese Seite wird in der Vorschau nicht angezeigt

Lass dir nichts Wichtiges entgehen!

bg1
HTML NOTES
HTML Classes:
Classes are used to group one or more HTML elements together and apply styles (CSS)
to them uniformly.
Syntax: <element class="class-name"></element> (e.g., <p
class="important">This is important text.</p>)
You can add multiple classes to an element: <p class="important highlight">This
text is both important and highlighted.</p>
Classes are defined in a separate CSS stylesheet or embedded within the <style> tag in
the HTML document.
Benefits of using HTML Classes:
Reusable Styles: Apply the same styles to multiple elements without repeating code.
Maintainability: Easier to modify styles by changing the class definition in one place.
Dynamic Styling: Use JavaScript to manipulate classes and change the appearance of
elements on the fly.
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<style>
.important {
font-weight: bold;
color: red;
}
.highlight {
background-color: yellow;
}
</style>
</head>
<body>
<p class="important">This is important text.</p>
<p class="highlight">This text is highlighted.</p>
<p class="important highlight">This text is both important and
highlighted.</p>
</body>
</html>
Use code with caution.
content_copy
HTML Buttons:
pf3

Unvollständige Textvorschau

Nur auf Docsity: Lade HTML starter notes for IT students und mehr Hausarbeiten als PDF für IT-Management herunter!

HTML NOTES

HTML Classes:

 Classes are used to group one or more HTML elements together and apply styles (CSS)

to them uniformly.

 Syntax: (e.g.,

This is important text.

)

 You can add multiple classes to an element:

This

text is both important and highlighted.

 Classes are defined in a separate CSS stylesheet or embedded within the

This is important text.

This text is highlighted.

This text is both important and highlighted.

Use code with caution.

content_copy

HTML Buttons:

 The tag defines a clickable button element.

 Buttons can be used for various actions like submitting forms, triggering JavaScript

functions, or navigating to different pages.

 Syntax: Click me

Button Types:

 Submit Button (type="submit") : Submits a form and sends data to the server.

 Reset Button (type="reset") : Resets the values of all elements within the form to their

default states.

 Button (type="button") : Used for generic actions (e.g., triggering JavaScript code).

Additional Button Attributes:

 disabled : Disables the button (user cannot click it).

 value : Specifies a value associated with the button when submitted in a form.

 onclick : Triggers a JavaScript function when the button is clicked.

Example:

HTML

First name:

Last name:

Submit Reset Click me for an alert!

Use code with caution.

content_copy

Advanced Button Techniques:

 Use CSS to style buttons and create custom appearances.

 Utilize JavaScript to dynamically change button behavior based on user interaction or

other events.

 Explore button frameworks like Bootstrap or Materialize for pre-designed button styles

and functionalities.