- HTML code describes the structure of the website, including headins, body paragraphs, and attributes of portions of content.
- A tag is a was to denote something about the infomation following the tag while an element is comprised of both an opening and closing tag and helps define the info between an opening and closing tag.
- We use attributes to provide extra info regarding the contents of an element. It is made-up of a name and a pre-defined value.
- Head element: contains information about the content of the page and is not necessarily shown on the page Title element: usually located within head element. Will be shown at the top of browser above the url or on the browser tab. Body element: everything shown on the webpage.
- To access source code from a page when using Chrome on a PC, simply right click and select "view source" from the drop down.
- h denotes a heading, the number that follows will determine size (1 being largest)
- bold
- italic
- start a new line of text
- superscript
- subscript
- An empty element is one that has no content between the open and closing tag. 8.Semantic mark up provides extra info RE the content on the page. It should not be used to change the appearance of text. Screen readers and search engines scan semantic mark up to provide more accurate results.
- header
- nav
- article
[basic html CodePen] (https://codepen.io/marikaross/pen/qxMWZV)
- Ordered lists have numbered list items, unordered lists have bullet points or a similar mark before each list item, and definition lists are made up of a set of terms
- along with a definition of each term.
- text user sees 3.Put target="_blank" after the website name to open in a new tab.
- You must use id attributes on headings and sections to link to a specific part of the same page.
- CSS allows you to create rules that govern how elements should appear.
- CSS stands for cascading style sheets. In the name, "cascade" refers to how one style rule can be applied to all pages without being repeated.
- A CSS rule is comprised of a selector that indicates which element the rule applies to and a declaration. The selector can be applied to more than one element if separated by commas. The declaration denotes style and is split into a property and a value separated by a colon. Multiple declarations are separated by a semi-colon {property:value;}
- To link to a CSS file, use "" element. This is an empty element that requires no closing tags and should be positioned inside the head element. <link href="location.css"" type="text/css" rel="stylesheet"/>
- It is useful to use external style sheets when the site has more than one page as this will allow all pages to use the same style rule, it keeps the content of the webpage separate from style, and you can change the style by simply altering one file.
- The color hex code is a 6 digit code that represents the amount of red, green, and blue (in that order). It begins with a hashtag.
- The three parts of the HSL color properties include:
- Hue - which is the color. It can be represented by a color circle where the angle specifies color or a slider marked 0-360
- Saturation - the amount (%) of gray in a color. 100% is all color and 0% is a shade of gray.
- Lightness - the amount of white or black in a color. 100% = white 0% is black.
- The three categories of fonts are serif, sans serif, and monospace.
- Serif - font has extra details on the ends of main strokes of letters. Generally used for longer blocks of text because it's easier to read for long periods of time.
- Sans-serif - no extra marks on the ends of letters. Good for small text.
- Monospace - every letter is the same width. Used for coding for the ease of reading as text is easier to line up.
- The action element controls the behavior of input.
- Select element cretes a drop down box.
- If using an input elemnt to send form data to a server, the type attribute must be set to submit.
- Fieldset is used to group similar items together. Most browsers will but fieldset groupings into a box.
- Border separates the edges of boxes, margin is located outside the edge of the border and creates a border between bpxes, and padding is the space between the border of a box and its contents.
- Top, right, bottom, left.
- Both block-level and inline elements are part of the display property. Block-level creates a new line of text that is the full width of the page while an inline element doesn't start on a new line and takes up only as much space as is necessary for the contents of the box.
- Fixed positioning allows a box to remain in the same spot on the page regardless of scroll. If you use fixed positioning without the z-index, it is likely that other boxes will go over this text in a fixed position becuase they're reverting to relative positioning. Adding the z-index ensures that the omportant box remains visible and in the same space.
- Fixed layouts do not change size despite the variations in user screen and displays. Fixed layouts are often defined in pixels. Liquid layouts will stretch and condense to fit changers in windows and screens. Sizes are given in percentages to ensure relative sizing regardless of window size.
1.The alt attribute is important for an imamge element because it tells you the content of the image even if you can't see it and helps screen reader softwware and search engines be mmore accurate. 2. An img element is inherently inline, but will be on its own if placed before or after a block element such as a paragraph or heading. 3. jpg files are useful when the image has a lot of hues. PNG files are more suitabble for logos, illustrations or diagrams that have fewer colors.
- It can be more beneficial to define height and width of images in css vs html because the server can then reference the predetermined size of the image in html for shorter code and faster loading time.
- An image sprite is one image used for multiple parts of an interface. the browser only needs one image which will load faster than multiples.
- Numbers are numerical data where whole numbers are referred to as integers. Strings represnt text and should be surrounded by quotation marks. Booleans are basically true/false statements.
- The logical operators that can be used with Booleans are and, or, and not.
- The naming conventions used for variables are no spaces, it cannot start with a #, only _ and $ are allowed as special characters. Typically variables (and all other things in Java) are written in camelCase.
- An expression is a fragment of code that produces a value, while a statement is a full "thought" of code and will generally end in a semi-colon.
- We avoid using certain names in java because the words already perform a function within JS or have been reserved for functions in future versions. If used, programs will not run correctly.
- Program flow is nice for programming becausse it allows programs to execute statements in the right order and in the most effficient manner.
- sayHello() asks for the result of the function while sayHello simply references the function.
- "return" statement determines the value of the function returned. What get returned is based on the parameters set within the function.
- Parameters are sort of like variables except that values are given by whichever line calls the function, instead of the code.
- When naming functions, it is helpful to stick to a single concept so it's more understandable to other readers.