Course Content
HTML Forms
HTML forms are an essential part of web development and provide a way for users to input and submit data to a server. Forms allow users to enter data such as text, numbers, checkboxes, radio buttons, and more. When a user submits a form, the data is typically sent to a server for further processing.
0/6
HTML Graphics
HTML provides various ways to incorporate graphics into web pages.
0/2
HTML Media
HTML provides built-in support for embedding and displaying various types of media content on web pages.
0/5
HTML APIs
HTML APIs, also known as browser APIs or web APIs, are a set of interfaces and methods provided by web browsers to interact with and manipulate web content, access device features, and perform various tasks. These APIs are implemented in JavaScript and are accessible to web developers when creating web applications. Here are some commonly used HTML APIs:
0/5
HTML Examples
Creating a Simple Web Page, Adding Links and Images and more
0/4
HTML5 for Free | HTML5 – Unleashing the Potential of Web Development
About Lesson

HTML attributes provide additional information or modify the behavior of HTML elements. Here are some commonly used HTML attributes with examples:

  1. class attribute: Specifies one or more class names for an element, which can be used for CSS styling or JavaScript manipulation.
<p class="highlight">This paragraph has a class applied to it.</p>
  1. id attribute: Specifies a unique identifier for an element, which can be used for JavaScript manipulation or linking to a specific element within a page.
<h1 id="page-title">Welcome to My Website</h1>
<a href="#page-title">Go to Page Title</a>
  1. src attribute: Specifies the source URL of an image or media file to be displayed.
<img src="image.jpg" alt="Description of the image">
  1. href attribute: Specifies the target URL for a hyperlink.
<a href="https://www.example.com">Visit Example Website</a>
  1. alt attribute: Provides alternative text for an image when it cannot be displayed.
<img src="image.jpg" alt="Description of the image">
  1. style attribute: Specifies inline CSS styles to apply to an element.
<p style="color: blue; font-size: 18px;">This paragraph has some inline styles applied.</p>
  1. disabled attribute: Disables an input, button, or other form elements.
<input type="text" disabled>
<button type="submit" disabled>Submit</button>
  1. placeholder attribute: Provides a temporary hint or example text within an input field.
<input type="text" placeholder="Enter your name">
  1. value attribute: Specifies the initial value of an input element.
<input type="text" value="John Doe">
  1. colspan and rowspan attributes: Defines the number of columns or rows a table cell should span.
<table>
  <tr>
    <th>Header 1</th>
    <th colspan="2">Header 2</th>
  </tr>
  <tr>
    <td rowspan="2">Cell 1</td>
    <td>Cell 2</td>
    <td>Cell 3</td>
  </tr>
  <tr>
    <td>Cell 4</td>
    <td>Cell 5</td>
  </tr>
</table>

These examples showcase the usage of various HTML attributes that enhance the functionality, styling, or behavior of HTML elements. Attributes can be combined and customized to meet specific requirements within your web pages.

Join the conversation