HTML, short for Hypertext Markup Language, is the standard markup language used to structure and present content on the World Wide Web. It provides a set of tags that define the structure and layout of web pages, allowing browsers to interpret and display them correctly. In simpler terms, HTML is like the skeleton of a webpage, providing the framework that holds everything together.
HTML documents are composed of elements enclosed within opening and closing tags. Tags are keywords surrounded by angle brackets (< and >) and are used to define different parts of a webpage. Elements can be nested inside other elements, creating a hierarchical structure.
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My Web Page!</h1>
<p>This is a paragraph of text.</p>
</body>
</html>
Tags are the building blocks of HTML and are used to define different types of content. Here are some commonly used tags:
Every HTML document should begin with a document type declaration ('<!DOCTYPE html>'), followed by the '<html>' tag that wraps the entire content. The content is divided into two main sections: the '<head>' and the '<body>'.
The '<head>' section contains metadata, such as the title of the webpage and external CSS or JavaScript files. The '<body>' section holds the visible content of the webpage that users see in their browsers.
Headings and paragraphs are fundamental elements for organizing and displaying text on a webpage. Headings range from '<h1>' to '<h6>', with '<h1>' being the highest level and <h6> the lowest.
<h1>Welcome to My Web Page!</h1>
<p>This is a paragraph of text.</p>
HTML provides various formatting tags to enhance the appearance of text. Here are a few examples:
<p>This is <strong>bold</strong> and <em>italic</em> text with an <u>underline</u>.</p>
HTML allows you to create both ordered (numbered) and unordered (bullet) lists.
Ordered List:
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
Unordered List:
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ul>
To display images on your webpage, you can use the '<img>' tag with the 'src' attribute specifying the image file's URL or file path.
<img src="https://edurev.gumlet.io/ath/to/image.jpg" alt="Description of the image">
HTML allows you to create links between different web pages using the '<a>' tag. The 'href' attribute specifies the URL of the target page.
<a href="https://www.example.com">Visit Example.com</a>
Congratulations! You've taken your first step into the exciting world of HTML. We covered the basics of HTML structure, tags, and elements. You learned how to create headings, paragraphs, lists, format text, insert images, and link pages together. With this knowledge, you can now begin crafting your own webpages. Explore more HTML tags and experiment with different elements to enhance your web design skills.
20 videos|15 docs|2 tests
|
|
Explore Courses for Software Development exam
|