HTML Basic Concepts and Document Structure

HTML Overview
HTML, or Hypertext Markup Language, is a markup language used for creating web documents, saved as ASCII text files. It enables hyperlinks, allowing users to click words or images to navigate to new pages, regardless of their operating system, as long as a web browser is available. Additionally, HTML4.0 introduced CSS for greater control over color, font, and layout.

HTML Structure
HTML documents begin and end with specific tags, always featuring a slash at the end. They can be divided into a head section, which starts and ends with head tags, and a body section, beginning and concluding with body tags. The term 'tag' refers to these specific markers that encapsulate the content.

HTML Tags
HTML uses both opening and closing tags, though some, like the <meta> tag, do not require a closing tag. Tag names are case-insensitive, and the <head> tag contains meta-information about the document, while the <body> tag marks the beginning and end of the main content. Various attributes, including text color and background images, can be defined, alongside tags for ordered lists, unordered lists, and definitions.

Text Formatting Tags
HTML offers a range of text formatting tags, including font-related properties such as family, size, weight, color, spacing, and height. The H1 tag is used for displaying the largest text, with size decreasing from H1 to H6. Additional tags include mbsp for creating spaces, as well as bold, underline, and subscript styles.

Image Tags
The italic tag is used for short code formatting, while image-related tags include formats like PNG and JPG for inserting images into web pages. The <img> tag attaches images by specifying their source, and an image map allows multiple links to be defined over a single image via area tags that specify clickable regions. Color-related tags define background colors using the body bgcolor attribute with various methods to express colors such as white or black.

Table Tags
Adding colors involves using color values for elements like six balls or black, and metadata includes document properties that are not visible in web browsers. Table tags encompass the overall structure, beginning with <table>, with <tr> representing rows and <td> for columns, while <caption> is used for the table title. Various attributes like width and border define the table's size and appearance in HTML.

Commenting in HTML
In HTML, comments serve as helpful annotations for future reference, enabling oneself or others to quickly grasp the program's content. These comments can be easily added by the developer, enhancing the code's readability and maintainability.

Comments

Popular Posts