HTML: Difference between revisions

From Computer Science Wiki
(4 intermediate revisions by the same user not shown)
Line 21: Line 21:
</syntaxhighlight>
</syntaxhighlight>


If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph (<p>) element:
If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph element:


<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
Line 28: Line 28:


Note: Tags in HTML are case-insensitive. This means they can be written in uppercase or lowercase. For example, a <title> tag could be written as <title>, <TITLE>, <Title>, <TiTlE>, etc., and it will work. However, it is best practice to write all tags in lowercase for consistency, readability, and other reasons.
Note: Tags in HTML are case-insensitive. This means they can be written in uppercase or lowercase. For example, a <title> tag could be written as <title>, <TITLE>, <Title>, <TiTlE>, etc., and it will work. However, it is best practice to write all tags in lowercase for consistency, readability, and other reasons.
HTML (Hypertext Markup Language) elements historically were categorized as either "block-level" elements or "inline-level" elements. Since this is a presentational characteristic it is nowadays specified by CSS in the Flow Layout. Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.<ref>https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements#inline_vs._block-level_elements_a_demonstration</ref>


== Do I understand this? (part 1) ==
== Do I understand this? (part 1) ==
Line 34: Line 36:
</html>
</html>


== List of HTML elements ==  
== List of some HTML elements ==  
 
You should be familiar with these tags.


* html - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
* html - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
Line 53: Line 57:
* span - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span
* span - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span
* img -https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
* img -https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
== Do I understand this? (part 2) ==
<html>
<iframe src="https://moodle.computersciencewiki.org/mod/hvp/embed.php?id=78" width="826" height="382" frameborder="0" allowfullscreen="allowfullscreen" title="HTML Part 3"></iframe><script src="https://moodle.computersciencewiki.org/mod/hvp/library/js/h5p-resizer.js" charset="UTF-8"></script>
</html>


== Helpful resources ==
== Helpful resources ==

Revision as of 16:03, 22 August 2021

HTML [1]

HyperText Markup Language, commonly referred to as HTML, is the standard markup language used to create web pages. Along with CSS, and JavaScript, HTML is a cornerstone technology used to create web pages, as well as to create user interfaces for mobile and web applications. Web browsers can read HTML files and render them into visible or audible web pages.

HTML describes the structure of a website semantically along with cues for presentation, making it a markup language, rather than a programming language.[2]

Introduction[edit]

Content gratefully used with permission [3]

HTML tags[edit]

Html elements.png

For example, consider the following line of text:

My cat is very grumpy

If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph element:

<p>My cat is very grumpy</p>

Note: Tags in HTML are case-insensitive. This means they can be written in uppercase or lowercase. For example, a <title> tag could be written as <title>, <TITLE>, <Title>, <TiTlE>, etc., and it will work. However, it is best practice to write all tags in lowercase for consistency, readability, and other reasons.

HTML (Hypertext Markup Language) elements historically were categorized as either "block-level" elements or "inline-level" elements. Since this is a presentational characteristic it is nowadays specified by CSS in the Flow Layout. Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.[4]

Do I understand this? (part 1)[edit]

List of some HTML elements[edit]

You should be familiar with these tags.

Do I understand this? (part 2)[edit]

Helpful resources[edit]

See also[edit]

References[edit]