I reviewed some basic knowledge about HTML tags. From what I understood, other students had already learned this last week, so maybe the professor was just giving us a practice exercise. I also learned about CSS, which is used with HTML tags. There are several ways to use CSS with HTML, but today we only covered the basics.
I forgot exactly how many <h~>
tags there are, but I learned that the heading tags range from <h1>
to <h6>
.
I used to be confused between the <p></p>
tag and the <pre></pre>
tag, but now I know the difference. The <p>
tag is a block-level element (not inline) that creates a paragraph and takes up the full width of its container. The <pre>
tag, on the other hand, preserves both whitespace and line breaks, so the text appears exactly as it is written in the code editor.
The professor said that using px is not recommended because it sets a fixed font size that does not adapt to different devices. Instead, she suggested using % for font-size. However, I think using rem might be a better option. I should look into which one is more appropriate.
If I want to apply multiple styles inside an inline style attribute, I need to separate them with a semicolon ;.
<tagname style="color: red; font-size: 1.2rem;">
The professor used Notepad as the code editor, but I found it very inconvenient, so I switched to VS Code. I think I should also study more about the fundamental concepts of the web, such as how a web browser works.