tanszek:oktatas:techcomm:basics_of_the_hypertext_markup_language
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tanszek:oktatas:techcomm:basics_of_the_hypertext_markup_language [2024/09/18 10:14] – kissa | tanszek:oktatas:techcomm:basics_of_the_hypertext_markup_language [2025/09/15 15:52] (current) – [Exercise] kissa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== HTML (HyperText Markup Language) ===== | ===== HTML (HyperText Markup Language) ===== | ||
| - | ==== 1. XML, a structured data description language ==== | + | ==== XML, a structured data description language ==== |
| XML (eXtensible Markup Language) is a universal data description language readable by both humans and machines, used for structured data storage and transfer. | XML (eXtensible Markup Language) is a universal data description language readable by both humans and machines, used for structured data storage and transfer. | ||
| Line 7: | Line 7: | ||
| Example: | Example: | ||
| <code XML> | <code XML> | ||
| - | < | + | < |
| < | < | ||
| < | < | ||
| Line 17: | Line 17: | ||
| The structures '' | The structures '' | ||
| - | HTML documents, which describe | + | Tags can have **attributes** (e.g. the identifier |
| - | ==== 2. Basic Structure of an HTML Document ==== | + | HTML documents, which describe the content of web pages, are also written in XML, using standardized elements with specific meanings to format or structure content. |
| + | |||
| + | ==== Development Environment ==== | ||
| + | |||
| + | For practicing HTML, we will use [[https:// | ||
| + | |||
| + | After VSCode is started, **Live Server** extension should be installed. To do this, click on the following icon, in the left sidebar: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Then search **Live Server**, and click the " | ||
| + | |||
| + | {{: | ||
| + | |||
| + | If the extension installed successfully, | ||
| + | {{: | ||
| + | |||
| + | To initialize a new project, create a new folder with File Explorer, then open this folder in VSCode (File > Open folder...). | ||
| + | |||
| + | Then, create a new file called **index.html**. | ||
| + | |||
| + | Copy the code from the next section, then save your HTML file (Ctrl+S). | ||
| + | |||
| + | Now, push the "Go Live" button, and open http:// | ||
| + | ==== Basic Structure of an HTML Document ==== | ||
| An HTML document mainly consists of three main parts: ''< | An HTML document mainly consists of three main parts: ''< | ||
| Line 31: | Line 55: | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| + | < | ||
| </ | </ | ||
| </ | </ | ||
| Line 46: | Line 71: | ||
| In the following, we can learn about the HTML elements that can be used in the '' | In the following, we can learn about the HTML elements that can be used in the '' | ||
| - | ==== 3. Comments ==== | + | ==== Comments ==== |
| HTML documents can contain comments, which are not visible to users in the browser, but are visible to developers in the HTML code. | HTML documents can contain comments, which are not visible to users in the browser, but are visible to developers in the HTML code. | ||
| Line 58: | Line 83: | ||
| It can be used to make our code more transparent and understandable for developers. | It can be used to make our code more transparent and understandable for developers. | ||
| - | ==== 4. Headings and Paragraphs ==== | + | ==== Headings and Paragraphs ==== |
| Headings are defined using the ''< | Headings are defined using the ''< | ||
| Line 69: | Line 94: | ||
| < | < | ||
| < | < | ||
| + | |||
| + | < | ||
| + | < | ||
| + | |||
| + | < | ||
| + | < | ||
| </ | </ | ||
| - | ==== 5. Text Formatting and Structuring ==== | + | ==== Text Formatting and Structuring ==== |
| Elements like ''< | Elements like ''< | ||
| Line 107: | Line 138: | ||
| ''< | ''< | ||
| - | ==== 6. Links ==== | + | ==== Links ==== |
| Links can point to web pages, email addresses, telephone numbers, etc. | Links can point to web pages, email addresses, telephone numbers, etc. | ||
| Line 119: | Line 150: | ||
| - | ==== 7. Images ==== | + | ==== Images ==== |
| Images are inserted using the ''< | Images are inserted using the ''< | ||
| Line 129: | Line 160: | ||
| In this example, '' | In this example, '' | ||
| - | In addition to this, we can define **relative URL**s to our HTML file. For example, if we have a folder '' | + | In addition to this, we can define **relative URL**s to our HTML file. For example, if we have a folder '' |
| <code XML> | <code XML> | ||
| Line 135: | Line 166: | ||
| </ | </ | ||
| - | ==== 8. Ordered and Unordered Lists ==== | + | Try downloading an image from the internet, and using a relative URL in your HTML document! |
| + | |||
| + | ==== Ordered and Unordered Lists ==== | ||
| For ordered lists, you can use the ''< | For ordered lists, you can use the ''< | ||
| Line 157: | Line 190: | ||
| </ | </ | ||
| - | ==== 9. Tables ==== | + | ==== Tables ==== |
| To create tables, use the following elements: | To create tables, use the following elements: | ||
| Line 187: | Line 220: | ||
| '' | '' | ||
| - | ==== 10. Exercise ==== | + | ==== Exercise ==== |
| - | Create an introduction page on your favorite topic (music, film, product, etc.) using paragraphs, images, links, tables, and lists. | + | Create an introduction page on your favorite topic (music, film, sport, etc.) using headings, |
| Feel free to use online resources (e.g. [[https:// | Feel free to use online resources (e.g. [[https:// | ||
tanszek/oktatas/techcomm/basics_of_the_hypertext_markup_language.1726654473.txt.gz · Last modified: 2024/09/18 10:14 by kissa
