Author: Saravana Kumar

  • Lesson 3: HTML Tags and Elements



    Objective:

    • Understand the concept of HTML tags and elements.
    • Learn the difference between opening and closing tags.
    • Familiarize with commonly used HTML tags for structuring content (e.g., headings, paragraphs, lists).
    • Recognize self-closing tags like <img>, <br>, etc.

    Introduction:

    HTML is a markup language used to structure content on the web. HTML tags are used to create and format content. Tags are written within angle brackets (< >) and can be paired, with an opening tag and a closing tag. Some tags are self-closing.


    1. HTML Tags:

    HTML tags are essential for creating any web page. These tags indicate how content should be formatted. A tag consists of:

    • Opening Tag: Marks the beginning of an element (e.g., <h1>).
    • Closing Tag: Marks the end of an element (e.g., </h1>).
    • Self-Closing Tags: Do not need a closing tag (e.g., <img />).
    Example:
    <h1>Welcome to HTML Learning!</h1>
    <p>This is a paragraph of text.</p>
    

    • <h1>: The opening tag for a top-level heading.
    • </h1>: The closing tag for the heading.
    • <p>: The opening tag for a paragraph.
    • </p>: The closing tag for the paragraph.

    2. Common HTML Tags:

    Here are a few commonly used HTML tags:

    • Headings: <h1>, <h2>, <h3>, etc.
    • Paragraph: <p>
    • Links: <a href="URL">
    • Images: <img src="image.jpg" alt="Image description" />
    • Lists: <ul> for unordered lists, <ol> for ordered lists, and <li> for list items.
    Example of a List:
    <ul>
        <li>Apples</li>
        <li>Bananas</li>
        <li>Oranges</li>
    </ul>
    
    


    3. Self-Closing Tags:

    Some tags don’t require a closing counterpart and are self-contained. Common self-closing tags include:

    • <img />: Embeds an image.
    • <br />: Inserts a line break.
    • <hr />: Creates a horizontal line.
    Example:
    <img src="image.jpg" alt="A sample image" />
    <br />
    <p>Some text below the image.</p>
    

    4. Nesting HTML Elements:

    HTML tags can be nested, meaning you can place tags inside other tags. Proper nesting ensures that your content is correctly structured.

    Example:
    <div>
        <h2>This is a heading inside a div.</h2>
        <p>Here is a paragraph inside the div.</p>
    </div>
    

    Activity:

    1. Write a simple HTML page that contains:
      • A heading <h1> and subheading <h2>.
      • A paragraph <p> and a list <ul>.
      • An image using <img />.
    2. Use the <br /> tag to break the line between elements.
    3. Practice nesting by placing a list inside a div or a paragraph inside a section.

    Example Activity Code:


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>HTML Tags Example</title>
    </head>
    <body>
        <h1>My HTML Page</h1>
        <h2>Subheading Example</h2>
        <p>This is a simple paragraph.</p>
        <ul>
            <li>First item</li>
            <li>Second item</li>
        </ul>
        <img src="image.jpg" alt="Sample image" />
        <br />
        <p>Text after the image.</p>
    </body>
    </html>
    

    Summary:

    • HTML tags are the building blocks of web pages.
    • Tags can be opening and closing pairs or self-closing.
    • Understanding common HTML tags like <h1>, <p>, <ul>, and <img> is crucial for structuring web content.
    • Nesting HTML tags allows for better organization and layout of content.

    Choice-Based Questions:

    1. Which of the following is the correct syntax for an image tag?
      • a) <img src="image.jpg">
      • b) <img href="image.jpg" />
      • c) <img src="image.jpg" alt="image description" />
      • d) <img alt="image description" src="image.jpg" />
      Answer:
      • c) <img src="image.jpg" alt="image description" />
    2. What is the purpose of the <br /> tag in HTML?
      • a) Creates a paragraph break.
      • b) Adds a line break within text.
      • c) Creates a border around text.
      • d) Creates a link.
      Answer:
      • b) Adds a line break within text.
    3. What is the function of the <ul> tag?
      • a) To create a paragraph.
      • b) To create an ordered list.
      • c) To create an unordered list.
      • d) To link a webpage.
      Answer:
      • c) To create an unordered list.

    Interactive Q&A (Hide/Show Option):

    1. What is an HTML tag?
      • [Click to Show Answer]
        • An HTML tag is a keyword surrounded by angle brackets (< >) that tells the browser how to display or interpret the content enclosed by the tag. Tags typically come in pairs: an opening tag and a closing tag.
    2. How do you create a heading in HTML?
      • [Click to Show Answer]
        • To create a heading, use the <h1> to <h6> tags, with <h1> being the largest and <h6> the smallest. Example: <h1>This is a heading</h1>.

    Final Notes:

    • Hands-On Practice: Make sure to test the different tags and elements you’ve learned by creating your HTML files.

  • Lesson 2: Setting Up Your First HTML File


    Objective:

    By the end of this lesson, students will:

    1. Understand how to set up an HTML file.
    2. Learn how to create and save an HTML file.
    3. Learn about basic file management and naming conventions for HTML files.
    4. Explore how to view and edit an HTML file in a web browser.

    2.1 How to Set Up an HTML File

    Setting up an HTML file involves creating a plain text document with the .html extension, which can be opened and viewed in any web browser. Let’s go through the basic steps of creating your first HTML file:

    1. Open a Text Editor:
      • Use any simple text editor to create an HTML file. Some popular text editors are:
        • Notepad (Windows)
        • TextEdit (Mac, in plain text mode)
        • VS Code (Cross-platform)
        • Sublime Text (Cross-platform)
        • Atom (Cross-platform)
    2. Write HTML Code:
      • Begin by writing the HTML code in the text editor. You can start with the basic structure and then add your content.

    Basic HTML Template:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>My First HTML Page</title>
    </head>
    <body>
        <h1>Welcome to My First HTML Page</h1>
        <p>This is my first webpage, and I am learning HTML!</p>
    </body>
    </html>
    
    
    In this code:
    • The <!DOCTYPE html> declaration specifies the document type.
    • The <html> tag wraps the entire content.
    • The <head> contains metadata, including the document’s title.
    • The <body> contains the visible content such as headings and paragraphs.

    2.2 Saving the HTML File

    After you’ve written the HTML code, you need to save the file properly so that it can be opened in a web browser.

    1. Save File as .html:
      • Choose Save As in your text editor.
      • In the Save as type dropdown, select All Files (if available).
      • Name your file with the .html extension (e.g., index.html).
    2. Choose the Right Location:
      • Save the file to a folder where you can easily find it, such as the Desktop or Documents folder.

    2.3 Viewing the HTML File in a Browser

    To view your HTML page:

    1. Navigate to the location where you saved the .html file.
    2. Double-click the file. This will open the HTML file in your default web browser.
    3. Your webpage should appear in the browser with the content you wrote in the <body> section.

    If the page doesn’t display correctly, ensure that the file is saved with the .html extension and that your text editor is not adding any extra file extensions (e.g., .txt).


    2.4 File Management and Naming Conventions

    Here are some tips for managing and naming your HTML files effectively:

    1. File Naming:
      • Always use lowercase letters for file names (e.g., myfirstpage.html).
      • Avoid spaces in file names. Use hyphens or underscores to separate words (e.g., my_first_page.html).
      • Keep file names simple and descriptive (e.g., contact.html, about.html).
    2. File Extensions:
      • Always use .html for HTML files.
      • HTML files can be opened in any web browser, but they must be saved with the .html extension.
    3. Folder Organization:
      • Create a dedicated folder for your project (e.g., mywebsite).
      • Keep all related files—HTML, images, CSS, JavaScript—inside the same folder or organized in subfolders.

    2.5 Editing and Updating Your HTML File

    As you work on your HTML page, you may need to make changes to the content or structure. Here’s how to update your HTML file:

    1. Open the file in your text editor.
    2. Make changes to the HTML code as needed.
    3. Save the file again (use Ctrl+S or Cmd+S on Mac).
    4. Refresh the browser to see the changes immediately (press F5 or click the refresh button in the browser).

    2.6 Key Takeaways

    • HTML files are plain text documents with a .html extension.
    • Use a text editor to create and write your HTML code.
    • Always save your HTML file with the .html extension and ensure proper file naming conventions.
    • To view your HTML page, open it in a web browser.
    • Make changes to your HTML file and refresh the browser to see updates.

    Activity 2: Create Your Own HTML File

    Objective: Create an HTML file that includes a title, heading, and a paragraph.

    1. Open a text editor and write the following code:
      • The title of your page should be “My First HTML Page.”
      • Create a heading (<h1>) with the text “Welcome to My First HTML Page.”
      • Create a paragraph (<p>) with the text “This is a simple webpage created as part of my learning.”
    2. Save the file as my_first_page.html.
    3. Open the file in a web browser and check if the content is displayed correctly.
  • Lesson 1: Introduction to HTML

    Objective

    By the end of this lesson, you’ll understand:

    • What HTML is.
    • Why it’s important.
    • How to create a basic HTML document.

    What is HTML?

    HTML (HyperText Markup Language) is the standard language for creating web pages. It structures the content on the web, using elements like text, images, and links.


    Why Learn HTML?

    • It’s the foundation of web development.
    • It’s beginner-friendly and easy to learn.
    • It allows you to build and customize websites.

    Basic HTML Structure

    An HTML document is made up of elements. Here’s the structure:

    <!DOCTYPE html>
    <html>
      <head>
        <title>My Page</title>
      </head>
      <body>
        <h1>Hello, World!</h1>
      </body>
    </html>
    


    Explanation

    1. <!DOCTYPE html>: Tells the browser this is an HTML5 document.
    2. <html>: The root element containing all HTML code.
    3. <head>: Contains metadata and the title of the page.
    4. <title>: Sets the page title visible in the browser tab.
    5. <body>: Holds the main content of the page.
    6. <h1>: Represents the main heading.
    7. <p>: Represents a paragraph.

    Activity

    1. Open a text editor (e.g., Notepad on Windows, TextEdit on Mac, or Visual Studio Code).
    2. Copy the example code above and save it as index.html.
    3. Open the file in a browser to see your first web page.

    Quiz

    1. What does <!DOCTYPE html> do?
      • a) Displays the page title.
      • b) Tells the browser the HTML version.
      • c) Adds a paragraph.
      • d) Styles the content.

    Summary

    • HTML is the backbone of web pages.
    • The structure includes elements like <html>, <head>, and <body>.
    • You can create your first web page with just a few lines of code.

  • Mastering LibreOffice Writer: Essential Shortcut Keys for Faster Productivity

    Mastering LibreOffice Writer: Essential Shortcut Keys for Faster Productivity

    General Shortcuts

    ActionShortcut Key
    New DocumentCtrl + N
    Open DocumentCtrl + O
    Save DocumentCtrl + S
    Print DocumentCtrl + P
    UndoCtrl + Z
    RedoCtrl + Y
    CutCtrl + X
    CopyCtrl + C
    PasteCtrl + V
    FindCtrl + F
    Find & ReplaceCtrl + H
    Select AllCtrl + A

    Navigation Shortcuts

    ActionShortcut Key
    Move to the Beginning of the DocumentCtrl + Home
    Move to the End of the DocumentCtrl + End
    Move to the Next WordCtrl + Right Arrow
    Move to the Previous WordCtrl + Left Arrow
    Move to the Next ParagraphCtrl + Down Arrow
    Move to the Previous ParagraphCtrl + Up Arrow

    Formatting Shortcuts

    ActionShortcut Key
    BoldCtrl + B
    ItalicCtrl + I
    UnderlineCtrl + U
    StrikethroughCtrl + D
    Increase Font SizeCtrl + Shift + >
    Decrease Font SizeCtrl + Shift + <
    Align LeftCtrl + L
    Align CenterCtrl + E
    Align RightCtrl + R
    JustifyCtrl + J
    Create Bulleted ListCtrl + Shift + L
    Create Numbered ListCtrl + Shift + N

    Paragraph & Document Shortcuts

    ActionShortcut Key
    Insert Page BreakCtrl + Enter
    Insert Horizontal LineCtrl + -
    Show/Hide Paragraph MarksCtrl + Shift + P
    Increase IndentationCtrl + M
    Decrease IndentationCtrl + Shift + M

    Table Shortcuts

    ActionShortcut Key
    Insert TableCtrl + F12
    Add Table RowCtrl + Enter
    Add Table ColumnCtrl + Shift +

    Other Useful Shortcuts

    ActionShortcut Key
    Open Styles and FormattingF11
    Show/Hide Formatting ToolbarCtrl + Shift + F
    Toggle Field CodesCtrl + F9
    Insert HyperlinkCtrl + K

    These shortcut keys are commonly used to increase productivity and speed while working in LibreOffice Writer.

    4o mini

  • LibreOffice Calc shortcut keys:

    LibreOffice Calc shortcut keys:

    General Shortcuts

    ActionShortcut Key
    New FileCtrl + N
    Open FileCtrl + O
    Save FileCtrl + S
    PrintCtrl + P
    UndoCtrl + Z
    RedoCtrl + Y
    CutCtrl + X
    CopyCtrl + C
    PasteCtrl + V
    Select AllCtrl + A
    FindCtrl + F
    Find & ReplaceCtrl + H
    Insert FunctionShift + F2
    Spell CheckF7

    Navigation Shortcuts

    ActionShortcut Key
    Move to the Next Cell (Right)Tab
    Move to the Previous Cell (Left)Shift + Tab
    Move to the Next Row (Down)Arrow Down
    Move to the Previous Row (Up)Arrow Up
    Go to the First Cell (A1)Ctrl + Home
    Go to the Last CellCtrl + End
    Go to the Next SheetCtrl + Page Down
    Go to the Previous SheetCtrl + Page Up

    Editing Shortcuts

    ActionShortcut Key
    Insert RowCtrl + Shift + +
    Delete RowCtrl + -
    Insert ColumnCtrl + Shift + =
    Delete ColumnCtrl + Shift + -
    Add a New SheetShift + F11
    Insert HyperlinkCtrl + K
    Open Cell Format DialogCtrl + 1

    Formatting Shortcuts

    ActionShortcut Key
    BoldCtrl + B
    ItalicCtrl + I
    UnderlineCtrl + U
    Align LeftCtrl + L
    Align CenterCtrl + E
    Align RightCtrl + R
    Increase Font SizeCtrl + Shift + >
    Decrease Font SizeCtrl + Shift + <
    Format as CurrencyCtrl + Shift + $
    Format as PercentageCtrl + Shift + %

    Cell Formatting Shortcuts

    ActionShortcut Key
    Format as DateCtrl + Shift + #
    Format as NumberCtrl + Shift + !
    Format as TextCtrl + Shift + @
    Merge CellsCtrl + M
    Wrap Text in CellAlt + Enter

    Data Shortcuts

    ActionShortcut Key
    AutoSumAlt + Shift + =
    Sort AscendingAlt + A + S
    Sort DescendingAlt + A + O
    Open Filter MenuCtrl + Shift + L
    Toggle Auto FilterCtrl + Shift + L

    These shortcuts will help improve your efficiency while using LibreOffice Calc.