UNIT TWO
https://drive.google.com/file/d/1B4QfGJ6LkWcE2h22r2zaD08c1fiYpOe9/view
Past papers | Past exam papers | Pearson qualifications
BY ZAINAB
2024
,Topic 7: Understanding the functionality of
HTML
7.1 Document structure
7.1.1 Understand how HTML is used to
structure web pages
a. doctypes
The doctype declaration is not an HTML tag; it is an instruction to the web browser about what
version of the markup language the page is written in. It should be the first thing in a HTML
document.
In HTML 5, the declaration is simple: <!DOCTYPE html>. In older documents (HTML 4 or
XHTML), the declaration is more complicated because the declaration must refer to a DTD
(Document Type Definition).
The <!DOCTYPE> declaration is not case sensitive.
b. elements
An element is an individual component of an HTML document. Elements provide semantic structure
and meaning to objects within a webpage.
Elements can contain attributes that define additional properties of a component.
An HTML element is defined by a start tag, some content, and an end tag. Empty elements have no
content (like the <br> element). Empty elements do not have an end tag.
HTML elements can also be nested i.e. elements can contain other elements. All HTML documents
consist of nested HTML elements. Property values of a parent element are inherited by the child
element.
c. tags
HTML tags are like keywords that define how the web browser will format and display the content.
d. attributes
HTML attributes are a piece of markup language used to adjust the behaviour or display of an HTML
element.
,7.1.2 Understand how to declare the
language of a html document
The lang attribute specifies the language of the element's content.
Syntax: <element lang="language_code">
e.g. <html lang=”en”>
- It allows search engines to return language specific results.
- It helps screen readers use the most appropriate pronunciation or accent.
, 7.1.3 Understand how the head element is
used to supply information about the
document
a. metadata
Metadata is information about data. It supplies information about the document.
The <meta> tag defines metadata about an HTML document.
<meta> tags always go inside the <head> element, and are typically used to specify character set,
page description, keywords, author of the document, and viewport settings. The metadata will not be
displayed on the page, but is used by browsers (how to display content or reload page), by search
engines (keywords), and other web services.
Elements belonging to the metadata content category modify the presentation or the behaviour of the
rest of the document, set up links to other documents, or convey other out-of-band information.
Elements belonging to this category are <base>, <command>, <link>, <meta>,
<noscript>, <script>, <style> and <title>.
examples of metadata
Define keywords for search engines:
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller zainabatif. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.32. You're not tied to anything after your purchase.