-
On a website, what is the purpose of HTML code?
HTML describes the structure of a web page
-
What is the difference between an element and a tag?
Tag is characters that live inside angled brackets:
<h1>
,<br>
,<body>
.HTML element is a set of two tags: an opening tag and a closing tag.
<h1>Hello</h1>
-
Why do we use attributes in HTML elements?
Attributes provide additional information about the contents of an element. In example below
type
,id
,name
,value
is attributes.<input type="button" id="delete" name="delete" value="Delete">
-
Describe the purpose of the head, title, and body HTML elements.
Everything inside the body element
<body>Body</body>
is shown inside the main browser window.The head element
<head>Head</head>
contains information about the page.The title element
<title>Title</title>
shows the title of page in the top of the browser, above where the URL of the visited page usually is typed, or on the tab for that page. -
In your browser (Chrome), how do you view the source of a website?
Once you have opened a website page, you can click right mouse button for the View menu, and select the option that says View page source.
-
List five different HTML elements and what they are used for. For example,
is a paragraph element, and it is used to represent a paragraph of text.<h1></h1>
is used for main headings.<i></i>
makes characters appear italic.<br />
adds a line break inside the middle of a paragraph<ol></ol>
is used for creating an ordered list.<a></a>
is used for links.
-
What are empty elements?
An empty element is the element that do not have any words between an opening and closing tag.
-
What is semantic markup?
Semantic markup is text elements that are not intended to affect the structure of your web pages, but they do add extra information to the pages.
-
What are three new semantic elements introduced in HTML 5? Use page 431 in the book to find more about these new elements.
The
<nav>
element is used to contain the major navigational blocks on the site such as the primary site navigation.The
<article>
element acts as a container for any section of a page that could stand alone and potentially be syndicated.The
<section>
element groups related content together, and typically each section would have its own heading.
- The basic HTML structure (body, title, head, etc.).
- At least two levels of headings.
- Multiple paragraphs.
- The paragraph text should be about what drives you to learn about web development.