Web Publishing & HTML Basics
വെബ് പബ്ലിഷിംഗും HTML അടിസ്ഥാനങ്ങളും
Covers web publishing fundamentals (static vs dynamic web pages, client-side and server-side scripting, web hosting), HTML5 document structure, container and empty tags, text formatting, lists, hyperlinks, images, tables, interactive forms, and foundational CSS and JavaScript concepts.
വെബ് പബ്ലിഷിംഗ് അടിസ്ഥാനങ്ങൾ (സ്റ്റാറ്റിക്, ഡൈനാമിക് വെബ് പേജുകൾ, ക്ലയന്റ്-സൈഡ്/സെർവർ-സൈഡ് സ്ക്രിപ്റ്റിംഗ്, വെബ് ഹോസ്റ്റിംഗ്), HTML5 ഘടന, കണ്ടെയ്നർ/എംപ്റ്റി ടാഗുകൾ, ലിസ്റ്റുകൾ, ഹൈപ്പർലിങ്കുകൾ, ചിത്രങ്ങൾ, ടേബിളുകൾ, ഫോമുകൾ, CSS, ജാവാസ്ക്രിപ്റ്റ് എന്നിവ വിശദീകരിക്കുന്ന പഠനഭാഗം.
Key Study Notes (5 Units)
Static vs Dynamic Web Pages & Web Hosting
- Web publishing is the process of designing, developing, and uploading web pages onto a web server so users worldwide can access them via a URL in a web browser.
- Static web pages display fixed content stored directly in HTML files and look identical to every visitor, whereas dynamic web pages generate personalised or database-driven content on the fly.
- Client-side scripts (such as JavaScript) execute inside the user's web browser for instant form validation and UI updates, while server-side scripts (PHP, Python, Node.js, JSP) run on the web server to query databases and authenticate users.
- Web hosting stores website files on permanently connected servers; common hosting tiers include Shared Hosting, Virtual Private Server (VPS), Dedicated Hosting, and Cloud Hosting.
- Files are commonly transferred from a developer's machine to a remote web server using FTP (File Transfer Protocol) or encrypted SFTP, and domain names are mapped to server IP addresses via DNS.
HTML5 Structure, Container Tags & Empty Tags
- HTML (HyperText Markup Language), originally developed by Tim Berners-Lee, is a markup language (not a programming language) that defines the structure of a web page using angle-bracketed tags.
- Every HTML5 document begins with the <!DOCTYPE html declaration to instruct the browser to render in standards mode, followed by the root <html element containing <head (metadata, <title, <meta, styles) and <body (visible content).
- Container tags have both an opening and a closing tag enclosing content (e.g., <p...</p, <h1...</h1, <div...</div), whereas empty (void) tags are self-contained without a closing tag (e.g., <br, <hr, <img, <input, <meta).
- HTML provides six heading levels from <h1 (largest, primary page heading) down to <h6 (smallest), while <p defines a paragraph and <!-- comment -- inserts non-rendered developer notes.
- Attributes are name-value pairs placed inside an opening tag to supply extra properties or behaviour (for example, lang="en", id="header", class="card").
Text Formatting, Lists, Hyperlinks & Images
- Semantic and visual text formatting tags include <strong or <b (bold), <em or <i (italic), <u (underline), <sub (subscript, as in \text{H}2\text{O}), and <sup (superscript, as in x^2).
- HTML supports three list types: unordered bulleted lists (<ul with <li), ordered numbered lists (<ol with <li, supporting type and start attributes), and description lists (<dl with <dt term and <dd definition).
- Hyperlinks are created using the anchor tag <a with the mandatory href attribute specifying the destination URL, internal section (id), or e-mail link (mailto:); adding target="blank" opens the link in a new tab.
- The empty <img tag embeds graphics using the src attribute (image path or URL) and the alt attribute (alternative text shown when an image fails to load and read by screen readers for accessibility).
- Audio and video elements are natively embedded in HTML5 using <audio and <video tags with attributes such as controls, autoplay, and loop.
HTML Tables & User Input Forms
- An HTML table is built with <table, containing rows (<tr), bold centred header cells (<th), and standard data cells (<td), optionally grouped inside <thead and <tbody.
- The colspan attribute merges cells horizontally across multiple columns, while rowspan merges cells vertically across multiple rows.
- Interactive forms use the <form container with action (destination server URL) and method (GET appends form data to the URL for non-sensitive searches; POST sends data in the HTTP request body for passwords and uploads).
- The <input tag renders diverse controls via its type attribute, including text, password, email, radio (single choice from a group sharing the same name), checkbox (multiple selections), and submit.
- Multi-line text entry uses <textarea, while drop-down selection menus use <select enclosing <option items.
CSS Styling & JavaScript DOM Fundamentals
- CSS (Cascading Style Sheets) separates presentation (colours, fonts, spacing, responsive layout) from HTML document structure.
- CSS can be applied in three ways: Inline (style="..." attribute on an element), Internal (<style block inside <head), and External (a separate .css file linked via <link rel="stylesheet" href="...", ideal for multi-page consistency).
- CSS selectors target elements by tag name (p), class attribute (.btn, reusable across elements), or unique identifier (navbar, unique per page); specificity resolves rule conflicts (Inline id .class element).
- JavaScript is the standard client-side scripting language embedded with <script tags to manipulate the DOM (Document Object Model), respond to events (onclick, onsubmit), and validate inputs before server submission.
- Responsive Web Design (RWD) uses the <meta name="viewport" tag alongside CSS Flexbox, Grid, and Media Queries so pages adapt smoothly from mobile screens to desktops.
Practice MCQs with Answers (10)
Which of the following HTML tags is an empty (void) tag that does not require a separate closing tag?
താഴെ പറയുന്നവയിൽ പ്രത്യേക ക്ലോസിംഗ് ടാഗ് ആവശ്യമില്ലാത്ത എംപ്റ്റി (Void) HTML ടാഗ് ഏതാണ്?
Show Answer & Explanation
In an HTML anchor tag (`<a>`), which attribute specifies the destination URL or target resource of the hyperlink?
ഒരു HTML ആങ്കർ ടാഗിൽ (`<a>`) ഹൈപ്പർലിങ്കിന്റെ ലക്ഷ്യസ്ഥാനമായ URL നൽകാൻ ഉപയോഗിക്കുന്ന ആട്രിബ്യൂട്ട് ഏതാണ്?
Show Answer & Explanation
Consider the following statements regarding HTML headings and lists: 1. HTML defines six heading levels from `<h1>` to `<h6>`, where `<h1>` represents the highest-level and largest default heading. 2. An ordered list is created using the `<ul>` tag, whereas an unordered bulleted list uses `<ol>`. 3. In a description list (`<dl>`), `<dt>` defines the term and `<dd>` provides its description. Which of the statements given above are correct?
HTML ഹെഡിംഗുകളെയും ലിസ്റ്റുകളെയും കുറിച്ചുള്ള താഴെ പറയുന്ന പ്രസ്താവനകൾ പരിശോധിക്കുക: 1. HTML-ൽ `<h1>` മുതൽ `<h6>` വരെ ആറ് തലക്കെട്ട് ലെവലുകളുണ്ട്; ഇതിൽ `<h1>` ആണ് ഏറ്റവും ഉയർന്നതും വലുതുമായ തലക്കെട്ട്. 2. നമ്പർ ലിസ്റ്റ് (Ordered list) നിർമ്മിക്കാൻ `<ul>` ടാഗും, ബുള്ളറ്റ് ലിസ്റ്റ് (Unordered list) നിർമ്മിക്കാൻ `<ol>` ടാഗുമാണ് ഉപയോഗിക്കുന്നത്. 3. ഒരു ഡിസ്ക്രിപ്ഷൻ ലിസ്റ്റിൽ (`<dl>`), `<dt>` പദത്തെയും `<dd>` അതിന്റെ വിവരണത്തെയും സൂചിപ്പിക്കുന്നു. മുകളിൽ നൽകിയവയിൽ ശരിയായ പ്രസ്താവനകൾ ഏവ?
Show Answer & Explanation
Match the following HTML table and form elements with their exact functions: (a) `<th>` — 1. Merges a table cell vertically across multiple rows (b) `rowspan` — 2. Defines a bold, centred table header cell (c) `colspan` — 3. Allows selecting multiple options simultaneously in a form (d) `checkbox` — 4. Merges a table cell horizontally across multiple columns Choose the correct match:
താഴെ പറയുന്ന HTML ടേബിൾ, ഫോം ഘടകങ്ങളെ അവയുടെ കൃത്യമായ ധർമ്മങ്ങളുമായി ചേരുംപടി ചേർക്കുക: (a) `<th>` — 1. ഒരു ടേബിൾ സെല്ലിനെ ഒന്നിലധികം വരികളിലേക്ക് ലംബമായി സംയോജിപ്പിക്കുന്നു (b) `rowspan` — 2. കടുപ്പിച്ചതും മധ്യഭാഗത്ത് ക്രമീകരിച്ചതുമായ ടേബിൾ ഹെഡർ സെൽ നിർവ്വചിക്കുന്നു (c) `colspan` — 3. ഒരു ഫോമിൽ ഒരേ സമയം ഒന്നിലധികം ഓപ്ഷനുകൾ തിരഞ്ഞെടുക്കാൻ അനുവദിക്കുന്നു (d) `checkbox` — 4. ഒരു ടേബിൾ സെല്ലിനെ ഒന്നിലധികം കോളങ്ങളിലേക്ക് തിരശ്ചീനമായി സംയോജിപ്പിക്കുന്നു ശരിയായ ജോഡി തിരഞ്ഞെടുക്കുക:
Show Answer & Explanation
Why is the `alt` attribute included inside an HTML `<img>` tag?
ഒരു HTML `<img>` ടാഗിനുള്ളിൽ `alt` ആട്രിബ്യൂട്ട് ഉൾപ്പെടുത്തുന്നതിന്റെ പ്രധാന ഉദ്ദേശ്യം എന്താണ്?
Show Answer & Explanation
When submitting sensitive data such as a login password through an HTML `<form>`, which HTTP `method` attribute value should be used so that the form data is not exposed in the browser's URL bar?
ഒരു HTML `<form>` വഴി ലോഗിൻ പാസ്വേഡ് പോലുള്ള രഹസ്യ വിവരങ്ങൾ അയയ്ക്കുമ്പോൾ, ഡാറ്റ ബ്രൗസറിന്റെ URL ബാറിൽ ദൃശ്യമാകാതിരിക്കാൻ `method` ആട്രിബ്യൂട്ടിൽ ഏത് മൂല്യം നൽകണം?
Show Answer & Explanation
Which method of applying CSS allows a single `.css` stylesheet file to control the visual appearance of dozens of HTML pages simultaneously?
ഒരൊറ്റ `.css` ഫയൽ ഉപയോഗിച്ച് ഒരു വെബ്സൈറ്റിലെ നിരവധി HTML പേജുകളുടെ ദൃശ്യരൂപം ഒരേസമയം നിയന്ത്രിക്കാൻ സഹായിക്കുന്ന CSS രീതി ഏതാണ്?
Show Answer & Explanation
Consider the following statements comparing client-side and server-side web technologies: 1. JavaScript is a client-side scripting language executed by the user's web browser to handle events and validate forms. 2. Server-side scripts such as PHP and Python execute on the remote web server before the resulting HTML is sent to the browser. 3. Static web pages query a relational database every time a visitor requests the page. Which of the statements given above are correct?
ക്ലയന്റ്-സൈഡ്, സെർവർ-സൈഡ് വെബ് സാങ്കേതികവിദ്യകളെ താരതമ്യം ചെയ്യുന്ന താഴെ പറയുന്ന പ്രസ്താവനകൾ പരിശോധിക്കുക: 1. ഉപയോക്താവിന്റെ വെബ് ബ്രൗസറിൽ പ്രവർത്തിച്ച് ഇവന്റുകൾ കൈകാര്യം ചെയ്യാനും ഫോമുകൾ പരിശോധിക്കാനും ഉപയോഗിക്കുന്ന ക്ലയന്റ്-സൈഡ് സ്ക്രിപ്റ്റിംഗ് ഭാഷയാണ് ജാവാസ്ക്രിപ്റ്റ്. 2. PHP, Python പോലുള്ള സെർവർ-സൈഡ് സ്ക്രിപ്റ്റുകൾ റിമോട്ട് വെബ് സെർവറിൽ പ്രവർത്തിച്ച ശേഷമാണ് ഫലമായുണ്ടാകുന്ന HTML ബ്രൗസറിലേക്ക് അയയ്ക്കുന്നത്. 3. ഒരു സന്ദർശകൻ പേജ് ആവശ്യപ്പെടുന്ന ഓരോ തവണയും സ്റ്റാറ്റിക് വെബ് പേജുകൾ ഒരു റിലേഷണൽ ഡാറ്റാബേസിൽ നിന്ന് വിവരങ്ങൾ തിരയുന്നു. മുകളിൽ നൽകിയവയിൽ ശരിയായ പ്രസ്താവനകൾ ഏവ?
Show Answer & Explanation
In CSS, if an HTML element `<p id="intro" class="highlight" style="color: green;">` is targeted simultaneously by `#intro { color: blue; }`, `.highlight { color: red; }`, and `p { color: black; }`, what colour will the browser render the paragraph text?
CSS-ൽ `<p id="intro" class="highlight" style="color: green;">` എന്ന എലമെന്റിന് `#intro { color: blue; }`, `.highlight { color: red; }`, `p { color: black; }` എന്നീ നിയമങ്ങൾ ഒരുമിച്ച് നൽകിയാൽ ബ്രൗസർ ആ ടെക്സ്റ്റ് ഏത് നിറത്തിൽ പ്രദർശിപ്പിക്കും?
Show Answer & Explanation
Match the following web publishing terms with their correct definitions: (a) `<!DOCTYPE html>` — 1. Client-side object tree manipulated by JavaScript (b) DOM — 2. Declaration instructing the browser to use HTML5 standards mode (c) `<sub>` — 3. Container tag used to embed interactive client-side scripts (d) `<script>` — 4. Formatting tag that renders characters below the baseline (e.g., $\text{H}_2\text{O}$) Choose the correct match:
താഴെ പറയുന്ന വെബ് പബ്ലിഷിംഗ് പദങ്ങളെ അവയുടെ ശരിയായ നിർവ്വചനങ്ങളുമായി ചേരുംപടി ചേർക്കുക: (a) `<!DOCTYPE html>` — 1. ജാവാസ്ക്രിപ്റ്റ് വഴി മാറ്റങ്ങൾ വരുത്താൻ കഴിയുന്ന ക്ലയന്റ്-സൈഡ് ഒബ്ജക്റ്റ് ട്രീ (b) DOM — 2. HTML5 സ്റ്റാൻഡേർഡ് മോഡ് ഉപയോഗിക്കാൻ ബ്രൗസറിന് നൽകുന്ന നിർദ്ദേശം (c) `<sub>` — 3. ഇന്ററാക്റ്റീവ് ക്ലയന്റ്-സൈഡ് സ്ക്രിപ്റ്റുകൾ ഉൾപ്പെടുത്തുന്ന ടാഗ് (d) `<script>` — 4. അക്ഷരങ്ങളെ ബേസ്ലൈനിന് താഴെയായി പ്രദർശിപ്പിക്കുന്ന ടാഗ് (ഉദാ: $\text{H}_2\text{O}$) ശരിയായ ജോഡി തിരഞ്ഞെടുക്കുക: