
Hypertext Markup Language or HTML coding involves the creation of web pages using HTML markup tags to structure content, define elements, and create the layout of a webpage. Here’s an overview of HTML coding:
- Structure: HTML documents are written in plain text and consist of a series of elements and tags. Each HTML element is enclosed by an opening tag (
<tag>) and a closing tag (</tag>), with content placed between them. - Elements: HTML elements define different parts of a webpage such as headings, paragraphs, links, images, lists, tables, forms, and more. Each element has a specific purpose and is denoted by a unique tag name.
- Attributes: Elements can have attributes that provide additional information about the element. Attributes are included within the opening tag and can modify the element’s behaviour or appearance.
- Document Structure: An HTML document typically comprises:
<!DOCTYPE html>: Declaration of the HTML version used.<html>: The root element that wraps all content.<head>: Contains metadata, such as the page title, character set, stylesheets, scripts, etc.<title>: Sets the title displayed in the browser’s title bar or tab.<body>: Contains the visible content of the webpage.
- Text Formatting: HTML can format text using tags like
<b>(bold),<i>(italic),<u>(underline),<strong>(strong emphasis),<em>(emphasised), etc. - Lists, Tables, and Forms: HTML provides tags to create ordered lists (
<ol>), unordered lists (<ul>), tables (<table>), and forms (<form>). - Comments: Comments in HTML start with
<!--and end with-->. They are used to add notes or descriptions for developers and are not displayed in the web browser.