diff --git a/source/Tutorials/HTML_CSS_JS.md b/source/Tutorials/HTML_CSS_JS.md index e030e2e..71382cf 100644 --- a/source/Tutorials/HTML_CSS_JS.md +++ b/source/Tutorials/HTML_CSS_JS.md @@ -17,11 +17,110 @@ has_toc: false {: .note } -> By [Victor Hsiao](https://www.linkedin.com/in/hsiaovictor/) +## HTML -When we want to add CSS styling to any of our HTML elements, to select the specific HTML elements we want to style, we would use one of the two types of CSS selectors +### **The `
` tag** -#### **ID Selectors** +The head tag represents the set up for our HTML page + +The two main components included in every `` tag are the `` tag** + +The `
` tag is used for big blocks of text, or paragraphs. We use it when we want to include big blocks of text on our website, like for a blog or article + +```
(insert some text here)
``` + +![p tag](https://blog.hubspot.com/hs-fs/hubfs/Google%20Drive%20Integration/Using%20the%20%3Cp%3E%20Tag%20in%20HTML-1.png?width=657&name=Using%20the%20%3Cp%3E%20Tag%20in%20HTML-1.png) + +### **The `` tag** + +The `` tag is a tag is used to link other webpages or websites. + +To use an `` tag, you have to specify the href attribute, which is the url that the tag links to. + +```(content here)``` + +In between the opening and closing `` tags, you insert some text that serves as the link. The default blue color text with the underline shows that the text is a link. + +### **The list tags** + +There are two types of lists in HTML: + +1. ordered lists +2. unordered lists + +### **Ordered Lists** + +To specify an unordered lists, you use the `` tags can have the same class, in this case, "paragraph" +From the below example, we see that there are multiple `
` tags + +Say we want to style the first two `
` tags and not the third one. We can assign them the same class, in this case, "paragraph" ```
I am an antihero, I have done good but have also done bad
I am played by Ryan Reynolds!
+The end!
``` To add style attributes to a class, we use the `.` tag instead @@ -61,6 +163,40 @@ To add style attributes to a class, we use the `.` tag instead } ``` +### **Basic Style Attributes** + +There are many different types of style attributes, but we'll lay out some basic ones. + +When writing any CSS code, you have to write it like this: + +![CSS basic style example](https://res.cloudinary.com/practicaldev/image/fetch/s--Uvc4p-Vs--/c_imagga_scale,f_auto,fl_progressive,h_900,q_auto,w_1600/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edojfcbz6sr7j0b2l6v1.jpg) + +The ones below are style attributes you would use for **text** + +**font-size**: changes the size of the text (font size is based on pixels, or px) + +`font-size: 16px;` + +**color**: changes the color of the text + +`color: blue;` + +**font-family**: give a specific font to selected text, there are many different font styles out there (the default is sans-serif) + +`font-family: sans-serif;` + +**text-align**: controls how text is aligned on a page, can be aligned left, right, or center + +`text-align: center;` + +For a full list of CSS properties, visit the link below: + +[All CSS properties](https://www.dofactory.com/css/properties) + +## JavaScript + + + _______________________________________________________________ [Previous: Getting Started](Getting Started){: .float-left .v-align-text-top} diff --git a/source/Web Development Concepts/Frontend/CSS.md b/source/Web Development Concepts/Frontend/CSS.md index e2fd570..774964e 100644 --- a/source/Web Development Concepts/Frontend/CSS.md +++ b/source/Web Development Concepts/Frontend/CSS.md @@ -17,14 +17,21 @@ has_children: false 1. TOC {:toc} -{: .note } -> By [Victor Hsiao](https://www.linkedin.com/in/hsiaovictor/) +{: .note } -We will now discuss different aspects of CSS +CSS, or Cascading Style Sheets, is like the paint and decorations you use to make your LEGO house look awesome after you've built it. While HTML defines the structure and content of your web page, CSS controls how your web page looks, like the colors, fonts, sizes, and layout. -### Types of Styling +CSS works together with HTML to make your web page look fantastic. It's like adding all the cool paint colors, decorations, and designs to your LEGO house after you've built it. You use CSS to tell the browser how you want each part of your web page to look. -#### **Inline Styling** +For example, you can use CSS to make your headings big and bold, your paragraphs have a specific font, and your buttons stand out with a bright color. HTML tells the browser what content goes where, and CSS tells the browser how to style and present that content, just like how the instructions tell you where to put each LEGO brick and the decorations to make your house look amazing. + +Together, HTML and CSS work hand in hand to create beautiful and functional web pages, just like how LEGO bricks and decorations come together to make awesome creations! + +## Types of Styling + +There are different types of CSS styling you can implement: + +### **Inline Styling** Inline styling is when you add CSS styles inside an HTML tag @@ -34,7 +41,7 @@ To do inline styling, you add the `style` attribute inside an HTML tag, and the This is considered the most inefficient form of implementing CSS styles because if we want to implement multiple CSS properties, it can get pretty jumbled and messy! -#### **Internal Styling** +### **Internal Styling** To utilize internal styling, you add the `