Basic HTML
Links and Navigation
Link Tags (<a>
)
The <a>
tag is used to create links, allowing users to navigate to other pages or sections of the same page. The <a>
tag requires the href
attribute to define the destination URL.
html
Internal and External Links
Links can be internal (within the same website) or external (to other websites). Internal links use relative paths, while external links use absolute paths.
html
Email Links
To create email links, we use mailto:
followed by the email address. Clicking the link opens the user's default email client with the address already filled in.
html
Link Attributes (title, target, etc.)
Besides href
, the <a>
tag can include several useful attributes. For example, title
shows a tooltip when the user hovers over the link, and target
defines how the link will open.
html
Creating Navigation Menus
We can use unordered lists (<ul>
) and list items (<li>
) to create navigation menus. These menus organize multiple links into a structured and user-friendly format.
html
Chapter Conclusion
With these tools, you can now create links and navigation menus, facilitating movement within your website and between different pages. In the next chapter, we will learn about inserting images and multimedia content in HTML.
- Introduction to HTML
- Text Elements in HTML
- Lists in HTML
- Links and Navigation
- Images and Multimedia Content
- Tables in HTML
- Forms in HTML
- HTML Head and Metadata
- Semantic HTML
- HTML5 APIs and Advanced Elements
- iFrames and HTML Embeddings
- Data Representation with HTML
- Accessibility in HTML
- Best Practices for HTML
- HTML and SEO
- HTML for Responsive and Mobile Design
- Integration of HTML with JavaScript
- Creating a Simple Website