Filters

Other

D

Your name is required for this document. It is only stored on this local computer and no where else. Please enter your name below:

Lesson 1.2HTML tags and elements

DGS badge
Lesson 1.2HTML tags and elements
  • Understand how webpages are built with tags
  • Understand how to modify a basic webpage
  • Be able to modify an HTML webpage and add content
  • Be able to save and preview a webpage
  • Be able to look up HTML tags
  • 1

    In one or two sentences, explain the different between viewing the source of a page and the inspector.

Your first webpage

Your first webpage is fairly straightforward to build. You do not need anything other than a simple text editor such as Notepad to create a webpage.

Write the following code into Notepad++, Visual Studio Code or Brackets.

HTML
<!DOCTYPE html>
<html>
  <head>
    <title></title>
  </head>
  <body>
  </body>
</html>
Creating a template webpage

The code shown previously is sometimes referred to as the basic structure of a webpage or the basic HTML page. This is because all pages start with this structure. 

Below is a simple template for a webpage you'll be editing.

HTML
<!DOCTYPE html>
<html>
  <head>
    <title>About [name]</title>
  </head>
  <body>
  <h1>[Name]</h1>
    <p>My name is...</p>
    <ul>
      <li>My favourite <b>subject<\b> is...</li>
      <li>My favourite <b>food<\b> is...</li>
      <li>My favourite <b>colour<\b> is...</li>
    </ul>
  </body>
</html>
  • 1

    Add in the missing information to the template page (download above). For example, where it says My name is..., Mr Balfour could change it to My name is Mr Balfour). After that open it with Google Chrome to ensure that the page is working correctly.

    Enter your code below:

  • 2

    Describe what your webpage looks like once you have viewed it in a browser. What does the <h1> look like? What does the <li> do? How has something been made bold?

  • 3

    What does the <title> do on the website?

Tags

What are tags?

Tags are an important part of HTML that allows the developer to specify what the webpage needs to have in it.

There are hundreds of tags available. And, since HTML is what is called a living standard (this means it is always getting updates), there are more being added all the time.

Developers sometimes need to look up how to write specific tags and it's not expected that even the most experienced developers or even people who create the tags can remember everything about them at all times. There are many useful websites that can help with this, giving you the code you need to write the HTML. One such website is w3schools.com. 

W3 Schools

Tags are fairly straightforward, for most tags, there is an opening and closing tag. Inside both tags, there is the type of tag that will be used inside.

How tags are represented

Notice with the closing tag that the type of tag is preceded by a forward slash. Some tags such as the <img> tag or the <link> tag do not have closing tags and are known as self-closing tags.

  • 1

    Look up the following tags and write the name or a short description of the tag below.

    <p>
    <img>
    <br>
    <a>
    <code>
    <!DOCTYPE html>
    <h1>
    <h3>
    <body>
    <head>
    <title>

    After you have found each of these, test them out on your page.

Download the profile.html page from below. This will become your main profile page.

Once you have answered each of the questions, remember to save this worksheet by pressing the Save button.

S2 Web Development Lessons
Provide Feedback

What did you think of this worksheet?

!
-- DragonDocs version 0.9 --

20.08.2017

Started on DragonDocs
Created a YASS/PHP and HTML-based system for saving and retrieving data

21.08.2017
Added CSS styles to page
Added JavaScript code to the page

02.02.2018
Added the multipage option (used in my dissertation)
Added the XMLHttpRequest-based multipage requests

08.02.2018
Added the Accessibility features
Filters added

10.02.2018
Purple filter added

17.03.2018
Added the Note class
Added the Did You Know class

-- DragonDocs version 1.0 (Yosemite) --

02.10.2019
First trial of DragonDocs in teaching

04.10.2019
Added the Task, Starter, Review your learning sections

07.10.2019
Added the feedback feature
Added the Dark Mode toggle

19.09.2020
Performance gains through the removal of unnecessary code
Added the Learning Intentions and Success Criteria features
Added the school badge

31.09.2021
Changed the headings (h2) to be more consistent with my website
Added sections to the pages - sections must be preceded by a h2
Added the "I have read this section" buttons
Changed the main heading zone to gradient text like my website
Added the table of contents feature

02.02.2022
Added the Print feature
Updated the footer to feature a new gradient
Added the Test It! class
Added the green flag
Automated the table of contents using JavaScript

06.02.2022
Added the 'includes' feature to the document, allowing inclusion of other files easily
Removed the requirement that the IP address must be one of the schools I have taught at, opening these documents to the public

02.03.2022
Once a section has been read or completed, the user can now hide that section

10.10.2022
Added the Extension task class
Changed the scrollbar on Windows to match that of macOS

-- DragonDocs version 2.0 (Kilimanjaro) --

07.08.2023
Added the Save button and the ability to save 'results' or answers to a Word document

12.01.2024
Added the large numbers class
Removed the background of the page navigation

-- DragonDocs version 2.1 (Aurora) --

08.02.2024
Added the active class to active links in the bottom section

09.02.2024
Added the image upload feature

10.02.2024
Added a fix that prevents the upload of non-image files into an image upload
Added pasting images to the upload feature

11.02.2024
Added the ability to view the changelog from a document
Improved the feedback system by recording the DragonDocs User ID and the Document ID data
The feedback from DragonDocs can be accessed much easier

12.02.2024
Added the new step_by_step_mode feature, allowing sections to be viewed individually
Added the ability to lock and unlock DragonDocs

22.02.2024
Added new checkboxes to each list item in a .task or .step
Added functionality to said checkboxes to add a strikeout to steps completed

23.02.2024
Added the new 'step' class
Steps are now auto incremented in CSS so the name displays the step number
Activities are now also auto incremented to display the activity number

25.02.2024
Added the 'matcher' feature to DragonDocs
Fixed an issue in which a closed section would retain it's original height within the document navigation
Added starters and the lesson review to the navigation on the side
The learning intentions and success criteria in teaching documents have now been redesigned to match my slides design

26.02.2024
All buttons are now on the right hand side
The accessibility button now has WAI under it

-- DragonDocs version 2.2 (Serengeti) --

26.02.2024
Code has been rewritten from the ground up to be object-oriented, making additional features easier to add

28.08.2024
Changed the look of grouped multiple choice buttons

06.03.2024
Added the new dragondocs_name feature and the requires_name property which allows names to be prepended to saved documents

09.03.2024
Added code so when the user types in their name and hits the enter key it will save that data and close the modal window
Added the new DragonShow and DragonDocs Link - a connection between both services that allows the presenter to communicate with users of DragonDocs from a DragonShow
Added the new timer option which is sent from DragonShows

04.04.2024
The matcher feature is no longer embed from jamiebalfour.scot but actually a feature of DragonDocs
Made DragonDocs 100% object-oriented, meaning much better management and better performance

05.04.2024
Made subtle changes to the interface to tidy it up a bit

06.04.2024
The multiple choice questions are now also part of the object oriented interface

09.04.2024
As requested, h3 elements are now included in the 'floating navigation'
The active navigation element now becomes bold and the left border has been retired

05.06.2024
Saving files now exports as a PDF which now also embeds all fonts (removed now)

18.06.2024
Select dropdowns are now temporarily saved to local storage and are now recovered when the document is reopened

19.12.2024
Multipage navigation now switches pages seamlessly - it's beautiful

17.01.2025
Added support for multi-select storage and reloading

-- DragonDocs version 2.3 (Great Barrier) --

17.02.2025
Added support for reorder tasks
Added lines and attachment circles for matching tasks

19.02.2025
Improved the performance of API calls
Separated the API from the core HTTP code

20.02.2025
Colours can be applied to matcher elements
Matcher colours now match the colours of the elements

Time left

: