HTML | IGCSE Information and Communication Technology Preparation - Year 11 PDF Download

Creating the Content Layer

  • The content layer of a web page consists of HTML elements like headings (<h1>, <h2>, etc.), paragraphs (<p>), links (<a>), images (<img>), and more.
  • HTML elements are the fundamental building blocks of web pages, used to structure and organize the content.
  • The head section contains metadata and information about the web page that is not displayed directly on the page.
    • It is enclosed by <head> and </head> tags.
    • The content inside the head tag appears in the browser tab.
  • The body section holds the main content of the web page, including text, images, videos, hyperlinks, tables, and more.
    • It is enclosed by <body> and </body> tags.
    • The content inside the body tag is displayed in the browser window.

Head Section Elements

Page Title

  • The <title> element is utilized to specify the page title visible in the browser tab.
  • It is positioned within the <head> section of the HTML document.

External Stylesheets

  • External stylesheets are incorporated in the <head> section through the <link> element.
  • The rel attribute is designated as "stylesheet", and the href attribute contains the relative file path to the CSS file.
  • Stylesheets are loaded sequentially, so their order influences hierarchy.

Metatags

  • Metatags are brief snippets of text in HTML that characterize a page's content.
  • They do not appear on the page itself but in the page's code.
  • Search engines, browsers, and other web services utilize metatags to gather information about a web page.
  • Metatags furnish supplementary details about the web page to the browser and search engines.
  • Examples:
    • Charset: The <meta charset="UTF-8"> tag specifies the character encoding for the HTML document. UTF-8 is the most widely used character encoding, encompassing almost all characters from all writing systems.
    • Keywords: The keywords attribute in a <meta> tag comprises a comma-separated list of words representing the web page's content. Initially aimed at aiding search engines in understanding page content, its relevance has diminished with advancements in search engine capabilities.
    • Author: The author attribute in a <meta> tag identifies the creator of the web page. It serves purposes such as copyright attribution and providing readers insight into content origin.
    • Description: The description attribute in a <meta> tag offers a brief overview of the web page's content. This description often surfaces in search engine results and can impact click-through rates.
    • Viewport: The <meta name="viewport" content="width=device-width, initial-scale=1"> tag ensures proper display of web pages across various devices (desktop, tablet, mobile) by controlling viewport size and initial zoom level.

Default Target Windows

  • The target attribute of the <base> element has the capability to establish a default target window for all links within a page.
  • For instance, specifying <base target="_blank"> will result in opening all links in a new window or tab by default.

Example:
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>My Web Page</title>
    <link rel="stylesheet" href="styles.css">
    <meta name="description" content="This is my web page">
    <meta name="author" content="Your Name">
    <base target="_blank">
</head>
<body>
    <h1>Welcome to My Web Page!</h1>
    <p>This is a sample paragraph.</p>
</body>
</html>

Question for HTML
Try yourself:
Which HTML element is used to specify the page title visible in the browser tab?
View Solution

Creating Body Content

  • The <body> section of the HTML document is where the primary content is placed, which can encompass text, images, tables, links, and more.

Tables in Webpages

  • In earlier stages of web development, tables were frequently employed for crafting intricate page layouts.
  • They offer a means to organize data into rows and columns.
  • Through the manipulation of cell padding, cell spacing, and borders, developers could control the visual presentation of the page.
  • Presently, tables are predominantly utilized for exhibiting tabular data, such as financial data, timetables, comparison charts, and statistical information.
  • Tables facilitate users in scanning, analyzing, and comprehending data.
  • Moreover, tables contribute to accessibility, as screen readers can effectively interpret them if appropriately structured using semantic HTML elements like <table>, <tr>, <th>, and <td>.

Inserting a Table

  • Tables in HTML are generated using the <table> element.
  • Rows in tables are defined using <tr>, headers with <th>, and data cells with <td>.
  • The rowspan and colspan attributes enable cells to span across multiple rows or columns.

Table Attributes

  • Adjust table and cell dimensions using the width and height attributes, specifying pixel or percentage values.
  • Tables can be styled using inline CSS or by linking an external stylesheet.

Inserting Objects

  • Incorporate text using elements like <p> for paragraphs and <h1> to <h6> for headings.
  • Insert images using the <img> element, indicating the image source with the src attribute.
  • Provide alternate text for images using the alt attribute.
  • Modify image or video dimensions using the width and height attributes.
  • Embed sound clips and videos using the <audio> and <video> elements, incorporating playback controls and autoplay functionality as necessary.

<body>
    <h1>Welcome to My Web Page!</h1>
    <p>This is a sample paragraph.</p>
    <table style="width:100%">
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
        </tr>
       <tr>
          <td>Data 1</td>
            <td>Data 2</td>
        </tr>
    </table>
    <img src="https://edurev.gumlet.io/mage.jpg" alt="My Image" width="500" height="600">
    <audio controls>
        <source src="https://edurev.gumlet.io/ound.mp3" type="audio/mpeg">
    </audio>
    <video controls autoplay>
        <source src="https://edurev.gumlet.io/ideo.mp4" type="video/mp4">
    </video>
</body>

Styling

Using the <div> Tag

  • The <div> tag acts as a container unit, enclosing other page elements and segmenting the HTML document into sections.
  • <div> elements are block-level elements commonly employed for grouping elements to apply styles.

Applying Styles and Classes

  • Styles can be directly applied to an element via the style attribute.
  • Classes, defined in CSS, can be assigned to HTML elements using the class attribute.
  • Multiple elements can share the same class.

Text Styling Tags

  • Utilize the <h1> to <h6> tags for headings, with <h1> being the largest and <h6> the smallest.
  • The <p> tag is utilized for paragraphs.
  • List items within unordered (<ul>) or ordered (<ol>) lists are marked using the <li> tag.

Applying Styles to Lists

  • The <ul> tag generates an unordered list, while <ol> creates an ordered list.
  • Styles can be directly applied to these lists using the style attribute or by utilizing a class.

<html>
<head>
    <style>
        .blue-text {
            color: blue;
        }
        .large-font {
           font-size: 20px;
        }
    </style>
</head>
<body>
    <div class="blue-text large-font">
        <h1>Blue Heading</h1>
        <p>Blue paragraph.</p>
        <ul style="list-style-type:circle;">
            <li>Blue list item 1</li>
            <li>Blue list item 2</li>
        </ul>
    </div>
</body>
</html>

Creating a Bookmark

  • A bookmark in HTML serves as a means to link to specific sections of a webpage.
  • It facilitates easy navigation for users to various content sections without requiring them to scroll through the entire page.
  • Bookmarks are established using the id attribute in HTML.
  • They enable users to swiftly jump to designated sections within a page.
  • For instance: <div id="section1">This is Section 1</div>.
  • Any tag can be transformed into a bookmark by appending an id attribute to it.
  • The id must be unique and not repeated elsewhere on the page.
  • To hyperlink to the bookmark, employ the <a> tag with the href attribute set to "#" followed by the bookmark's id.
  • By amalgamating the <a> tag and the href attribute with a specific id, a link is formed, directing the user to the bookmarked section of the page.

Creating Hyperlinks

  • A hyperlink, commonly known as a 'link,' serves as a reference to data that readers can directly access by clicking or tapping.
  • It stands as a fundamental element of the World Wide Web, facilitating navigation from one web page or section to another.
  • Hyperlinks are crafted using the <a> (anchor) tag in HTML.
  • They can link to various sections of the same page, other locally stored web pages, or external websites.
    • Text Hyperlinks: Typically, a highlighted portion of text, often underlined or displayed in a different color.
    • Image Hyperlinks: An image clickable to navigate to another page or section within the same page.
    • Button Hyperlinks: Clickable buttons redirecting users to another page or section.
  • Hyperlinks employ the 'href' attribute within the <a> tag in HTML.
  • The 'href' attribute contains the URL of the page to which the link leads.
  • The text enclosed between the opening <a> and closing </a> tags represents the clickable link text displayed on the page.

Hyperlink Types

  • Same-page bookmark: Utilize "#" followed by the id of the element you want to navigate to. Example: <a href="#section1">Go to Section 1</a>
  • Locally stored web page: Employ the relative path to the file. Example: <a href="contact.html">Contact Us</a>
  • External website: Provide the full URL. Example: <a href="https://www.google.com">Google</a>
  • Email link: Use mailto: followed by the email address. Example: <a href="mailto:example@example.com">Email Us</a>
  • Specified location: Use the target attribute to indicate where to open the link: "_blank" for a new tab or window, "_self" for the same tab or window, or a named window. Example: <a href="https://www.google.com" target="_blank">Google</a>'

<html>
<body>
    <div id="section1">
        <h1>This is Section 1</h1>
       <a href="#section2">Go to Section 2</a><br>
        <a href="contact.html">Contact Us</a><br>
        <a href="https://www.google.com" target="_blank">Google</a><br>
        <a href="mailto:example@example.com">Email Us</a>
       </div>
    <div id="section2">
        <h1>This is Section 2</h1>
        <a href="#section1">Go back to Section 1</a>
    </div>
</body>
</html>

Relative and Absolute File Paths

Relative File Paths

  • A relative file path indicates the location of a file or directory relative to the current location or the location of the file referencing it.
  • For example, if both an HTML file and an image are in the same directory, you can reference the image in the HTML file using just its name (e.g., image.jpg).

Absolute File Paths

  • An absolute file path specifies the precise location of a file or directory, regardless of the current location.
  • It encompasses the entire path from the root directory to the file or directory in question.
  • For instance, an absolute file path on a Windows system might appear as C:\Users\Username\Documents\image.jpg.

Reasons Not to Use Absolute File Paths for Local Objects

  • Employing absolute file paths for local web pages or objects may result in broken links when the website is relocated to a different directory or server.
  • The web page or object might not exist at the specified location on the server or the user's computer.
  • If a website is relocated or backed up, absolute links will persistently point to the original location rather than the new or backup location.
The document HTML | IGCSE Information and Communication Technology Preparation - Year 11 is a part of the Year 11 Course IGCSE Information and Communication Technology Preparation.
All you need of Year 11 at this link: Year 11
91 docs|23 tests

Top Courses for Year 11

FAQs on HTML - IGCSE Information and Communication Technology Preparation - Year 11

1. What are the key elements of HTML?
Ans. The key elements of HTML include tags, attributes, and content. Tags are used to define the structure of the content, while attributes provide additional information about the elements. Content refers to the text, images, and other media that make up the webpage.
2. How do meta tags affect HTML?
Ans. Meta tags in HTML provide information about the webpage, such as the author, description, and viewport settings. They help search engines understand the content of the page and improve its visibility in search results.
3. What is the purpose of the viewport meta tag in HTML?
Ans. The viewport meta tag in HTML is used to control the layout and scaling of the webpage on different devices. It ensures that the content is displayed correctly and is responsive to various screen sizes.
4. How can tables be created in HTML?
Ans. Tables in HTML can be created using the <table> element, along with <tr> for rows, <td> for data cells, and <th> for header cells. CSS can also be used to style the tables and make them visually appealing.
5. How can body content be created in HTML?
Ans. Body content in HTML can be created using various elements such as headings, paragraphs, images, and links. These elements help structure the content and make it more readable for users.
Explore Courses for Year 11 exam

Top Courses for Year 11

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Sample Paper

,

Free

,

HTML | IGCSE Information and Communication Technology Preparation - Year 11

,

study material

,

Viva Questions

,

Summary

,

HTML | IGCSE Information and Communication Technology Preparation - Year 11

,

Exam

,

Important questions

,

ppt

,

pdf

,

Semester Notes

,

MCQs

,

mock tests for examination

,

HTML | IGCSE Information and Communication Technology Preparation - Year 11

,

Objective type Questions

,

video lectures

,

Previous Year Questions with Solutions

,

Extra Questions

,

past year papers

,

shortcuts and tricks

,

practice quizzes

;