Git Product home page Git Product logo

html-programs's Introduction

What is HTML?

HTML stands for Hypertext Markup Language. It is the standard markup language for creating web pages. HTML describes the structure of a web page semantically, including elements like headings, paragraphs, links, images, and more.

Basic Structure of an HTML Document:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Title of the Document</title>
</head>
<body>
    <!-- Content goes here -->
</body>
</html>
  • <!DOCTYPE html>: Declaration of the HTML version.
  • <html>: The root element of the HTML document.
  • <head>: Contains meta-information about the HTML document.
  • <meta charset="UTF-8">: Specifies the character encoding for the document.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0">: Sets the viewport for responsive web design.
  • <title>: Defines the title of the document.
  • <body>: Contains the content of the HTML document.

HTML Elements:

HTML elements are the building blocks of HTML pages. They are represented by tags enclosed in angle brackets.

Example:

<p>This is a paragraph</p>
<a href="https://example.com">This is a link</a>
<img src="image.jpg" alt="Description of the image">
  • <p>: Paragraph element.
  • <a>: Anchor element (link).
  • <img>: Image element.

Attributes:

HTML elements can have attributes that provide additional information about them.

Example:

<a href="https://example.com" target="_blank">This link opens in a new tab</a>
<img src="image.jpg" alt="Description of the image">
  • href: Specifies the URL of the link.
  • target="_blank": Specifies that the link should open in a new tab.
  • src: Specifies the source URL of the image.
  • alt: Specifies an alternate text for an image.

Common HTML Elements:

  • Headings: <h1> to <h6>
  • Paragraphs: <p>
  • Links: <a>
  • Images: <img>
  • Lists: <ul>, <ol>, <li>
  • Tables: <table>, <tr>, <td>
  • Forms: <form>, <input>, <button>

HTML Comments:

Comments in HTML are used to provide explanations or notes to the code and are not displayed in the browser.

Example:

<!-- This is a comment -->
<p>This is a paragraph</p>

Conclusion:

HTML provides the basic structure and content of web pages. Understanding HTML is essential for web development as it forms the foundation upon which websites are built. This overview covers the fundamental aspects of HTML, but there is much more to explore and learn in HTML and web development in general.

html-programs's People

Contributors

javedalihosamani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.