Now that we know the basics of web development, it's time to learn the basics of HTML, the backbone of the web development world. Especially the front-end.
HTML is characterized by giving us the ability to control how content is displayed on the browser, and opens up wide areas for us to format texts, images, and other elements in an interactive and effective way.
An HTML file contains codes known as "tags", which allow us to direct the browser to perform certain commands, such as how to display texts or organize the page.
What is HTML? Understanding the basics of coding and tags for beginners
In HTML, coding is done using texts with special meaning called "tags". Most tags appear in a specific way,
<Opening-Tag> Specific text </Closing-Tag>
Where the text is surrounded by symbols less than < and greater than >. For example, the tag <strong>
is used to make the text inside it prominent.
<strong>Bold Text</strong>
Here's another example of a tag used to emphasize text, called <em>
. This tag itals the embedded text to indicate its importance, as in:
<em>Italic Text</em>
HTML Tag Structure Explained
Every element starts with an opening tag and ends with a closing tag. For example, the opening tag <figcaption>
is followed by the closing tag </em>
, where the latter is marked with a slash /
.
In HTML, tags that come in pairs are essential; a tag cannot be opened without being closed, similar to parentheses where a parenthesis cannot be closed without being opened first.
This helps to build a proper structure for the content, which is a fundamental concept in programming languages.
Element vs. Tag: Understanding the Difference
In HTML, the entire unit that contains the opening tag and the closing tag, as well as the content inside, is called an "Element".
Only the opening tag and the closing tag are called a "tag". Although some people use the term "tag" to refer to the entire element, knowing this distinction is important in programming to ensure proper interaction with the browser.
Click here To Read Full Article
Top comments (0)