Computer ScienceChapter 3: Programming Fundamentals
3.2 HTML
HTML (Hypertext Markup Language):
Explanation level
This topic introduces Hypertext Markup Language (HTML), the language used to create and display content on webpages, including its structure, tags, and basic elements.
Definition
HTML (Hypertext Markup Language): HTML is the language used to define and display your contents in the form of a webpage. With the help of tags, you will define different contents what they are, and correspondingly HTML will display them accordingly. HTML identifies and provides support for every object in a webpage on the basis of tags.
Core Concept
HTML is like the skeleton of a webpage. Just as a skeleton gives your body its structure—head, arms, legs, torso—HTML gives a webpage its structure: headings, paragraphs, images, links, tables, and lists. Without HTML, a webpage would just be a jumble of text with no organization. HTML uses tags (like `<p>` for paragraph, `<h1>` for heading) to tell the browser what each piece of content is and how it should be displayed.
Detailed Explanation
What is HTML?
Hypertext Markup Language (HTML) is the language used to define and display your contents in the form of a webpage. With the help of tags, you will define different contents what they are, and correspondingly HTML will display them accordingly. HTML identifies and provides support for every object in a webpage on the basis of tags.
Example: If you want to display the sentence "This is my first attempt for a webpage." in a web browser, you would write: ```html <p>This is my first attempt for a webpage.</p> ```
- Character(s) between angle brackets '<' and '>' are called tags.
- Every component of HTML is identified by a starting and terminating tag.
- The starting marker is `<p>` and the closing marker is `</p>`.
- The 'p' tag is used for paragraph/sentences.
- There are tags for everything in HTML.
Writing HTML
You can write your HTML code in a notepad and run it in a browser. There are many software/IDE environments available that help in minimizing your coding efforts, such as Visual Studio, NetBeans, etc. For this chapter, we will be using the Visual Studio version 2022 environment, but the codes mentioned here will be applicable to any other environment as well.
Installing Visual Studio
For installing the latest Integrated Development Environment (IDE) of Microsoft Visual Studio, visit https://visualstudio.microsoft.com/vs/ and download the installer. The installer is an executable file (.exe extension) and you just need to double-click to start the installation.
Microsoft Visual Studio is a wide-ranging IDE which can be used for writing and running code for more than 30 languages. Therefore, it allows you to choose the language environment. Once selected, click "install" and it will download and install the environment on your system (PC/Laptop). After the installation, you can run the IDE from your system.
Did you understand this topic?
Your answer is saved with your learning record. It does not mark the topic as mastered.
Same supplied content as this Notes page (shared canonical source).