reading-notes

Introduction to HTML

Why is it important to use semantic elements in our HTML?

According to www.simplilearn.com, the semantic HTML tags help the search engines and other user devices to determine the importance and context of web pages. The pages made with semantic elements are much easier to read. It has greater accessibility. It offers a better user experience.

How many levels of headings are there in HTML?

HTML defines six levels of headings. A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least. https://www.w3.org/MarkUp/html3/headings.html#:~:text=HTML%20defines%20six%20levels%20of,level%20and%20H6%20the%20least.

What are some uses for the and elements?

Subscript: The tag is used to add a subscript text to the HTML document. The tag defines the subscript text. Subscript text appears half a character below the normal line and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O to be written as H2O. Superscript: The tag is used to add a superscript text to the HTML document. The tag defines the superscript text. Superscript text appears half a character above the normal line and is sometimes rendered in a smaller font. Superscript text can be used for footnotes. https://www.geeksforgeeks.org/html-subscript-superscript-tags/

When using the element, what attribute must be added to provide the full expansion of the term?

A fairly common element you’ll meet when looking around the Web is — this is used to wrap around an abbreviation or acronym. When including either, provide a full expansion of the term in plain text on first use, along with the to mark up the abbreviation. This provides a hint to user agents on how to announce/display the content while informing all users what the abbreviation means. https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting

Learn CSS

What are ways we can apply CSS to our HTML?

An external stylesheet contains CSS in a separate file with a .css extension. This is the most common and useful method of bringing CSS to a document. An internal stylesheet resides within an HTML document. To create an internal stylesheet, you place CSS inside a

Why should we avoid using inline styles?

It is the opposite of a best practice. First, it is the least efficient implementation of CSS for maintenance. One styling change might require multiple edits within a single web page. Second, inline CSS also mixes (CSS) presentational code with HTML and content, making everything more difficult to read and understand. Separating code and content makes maintenance easier for all who work on the website. https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/How_CSS_is_structured

Review the block of code below and answer the following questions:

What is representing the selector? h2 Which components are the CSS declarations? color, padding Which components are considered properties? black, 5px

What data type is a sequence of text enclosed in single quote marks?

A string

List 4 types of JavaScript operators.

Addition, subtraction, strict equality, not

Describe a real world Problem you could solve with a Function

When I am on a website typing in my password from a prompt

An if statement checks a __ and if it evaluates to ___, then the code block will execute.

condition; true

What is the use of an else if?

The if/else statement executes a block of code if a specified condition is true. If the condition is false, another block of code can be executed. https://www.w3schools.com/jsref/jsref_if.asp

List 3 different types of comparison operators.

===, !=, <>

What is the difference between the logical operator && and ||?

What is the difference between && and || operators? && is used to perform and operation means if anyone of the expression/condition evaluates to false whole thing is false. || is used to perform or operation if anyone of the expression/condition evaluates to true whole thing becomes true. so it continues till the end to check atleast one condition to become true. https://stackoverflow.com/questions/20207997/the-difference-between-and#:~:text=%26%26%20is%20used%20to%20perform,false%20whole%20thing%20is%20false.&text=%7C%7C%20is%20used%20to%20perform,one%20condition%20to%20become%20true.