Podcast
Questions and Answers
Яка структура HTML-документа?
Яка структура HTML-документа?
- Тег <head> передує тегу <body> (correct)
- Тег <html> закривається перед тегом <head>
- Тег <html> відсутній
- Весь контент міститься всередині тегу <body> (correct)
Яке з наступних тверджень про теги є вірним?
Яке з наступних тверджень про теги є вірним?
- Теги не потребують закриваючих частин
- Всі теги мають одинарні закриваючі теги
- Закриваючий тег має слеш перед назвою (correct)
- Теги завжди закриваються в середині
Яка правильна форма тега для вставки зображення?
Яка правильна форма тега для вставки зображення?
- <image src='image.jpg'/>
- <img src='image.jpg' alt='Опис'> (correct)
- <img src='image.jpg'> (correct)
- <img='image.jpg'>
Які елементи слід використовувати для створення списку?
Які елементи слід використовувати для створення списку?
Яка функція атрибутів у HTML?
Яка функція атрибутів у HTML?
Що таке семантичний HTML?
Що таке семантичний HTML?
Яка роль тегу
у HTML документі?
Яка роль тегу
у HTML документі?
Які елементи використовуються для створення зав'язок у HTML?
Які елементи використовуються для створення зав'язок у HTML?
Flashcards
HTML
HTML
Мова розмітки для створення веб-сторінок.
Теги
Теги
Елементи, які визначають структуру та вміст веб-сторінки, зазвичай парні.
Структура HTML
Структура HTML
HTML-документ починається з тега, що містить
та .
Атрибути
Атрибути
Signup and view all the flashcards
Коментарі HTML
Коментарі HTML
Signup and view all the flashcards
Семантичний HTML
Семантичний HTML
Signup and view all the flashcards
Заголовки
Заголовки
Signup and view all the flashcards
Зображення
Зображення
Signup and view all the flashcards
Study Notes
Introduction to HTML
- HTML stands for HyperText Markup Language.
- It's the standard markup language for creating web pages.
- HTML uses tags to define the structure and content of a webpage.
- Tags are enclosed in angle brackets
< >
. - Tags usually come in pairs: an opening tag and a closing tag. The closing tag has a forward slash before the tag name.
Basic HTML Structure
- Every HTML document starts with a
<html>
tag. - The
<html>
tag encloses the entire content of the document. - Inside the
<html>
tag, there are two main sections:<head>
: Contains meta-information about the page (title, character set, etc.).<body>
: Contains the visible content of the page.
- The
<head>
section typically includes a<title>
tag, defining the title that appears in the browser's title bar. - The
<body>
section contains elements such as headings, paragraphs, images, and links.
Common HTML Elements
- Headings:
<h1>
to<h6>
for different levels of headings.<h1>
is the largest,<h6>
the smallest. - Paragraphs:
<p>
for block-level paragraphs. - Images:
<img>
for image insertion; it's a self-closing tag. Essential attributes includesrc
(source of the image) andalt
(alternative text for screen readers and if the image fails to load). - Links:
<a>
(anchor) tag for creating links to other pages or resources. Thehref
attribute specifies the URL of the linked resource. - Lists:
<ul>
(unordered list) and<ol>
(ordered list). Use<li>
(list item) for each list item. - Divisions:
<div>
for grouping sections of content; used for styling or layout purposes. - Span:
<span>
for inline styling or grouping inline text — better for styling small parts of text, while<div>
is for blocking content and layout.
Attributes
- Attributes provide additional information about HTML elements. They are included within the opening tag.
- For example, the
href
attribute in<a>
tags specifies the link destination, and thesrc
attribute in<img>
tags specifies the image source. - Attributes have names and values, separated by an equals sign (
=
), and are enclosed in quotation marks.
HTML Comments
- Comments are used to explain or document the code.
- They are ignored by the browser.
- Comments are placed between
<!--
and-->
.
Semantic HTML (Modern HTML)
- Semantic HTML uses tags that clearly describe the meaning of the content.
- Instead of solely relying on layout-based tags, semantic tags such as
<header>
,<nav>
,<article>
,<aside>
,<footer>
, and<main>
help structure the page meaningfully. - This improves accessibility, SEO, and maintainability.
Basic Structure Example
<html>
<head>
<title> My Webpage </title>
<body>
<h1> Welcome to my webpage </h1>
<p> This is a paragraph of text. </p>
<img src="image.jpg" alt="My Image">
<a href="https://www.example.com"> Link to Example</a>
<ul>
<li> Item 1 </li>
<li> Item 2 </li>
</body>
</html>
Key Concepts Summary
- Tags define elements.
- Attributes provide details about elements.
- HTML structure outlines the page content.
- Semantic HTML improves structure and meaning.
- Comments are for human readers, not browsers.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Цей тест охоплює основи HTML, мову розмітки для веб-сторінок. Ви дізнаєтеся про структуру HTML-документу, основні елементи та їх використання. Пройшовши тест, ви зрозумієте, як створювати власні веб-сторінки з використанням HTML.