diff --git a/packages/api/content/paths/html/001-common-elems/img/cupcake.png b/packages/api/content/paths/html/001-common-elems/img/cupcake.png new file mode 100644 index 00000000..47ac93e5 Binary files /dev/null and b/packages/api/content/paths/html/001-common-elems/img/cupcake.png differ diff --git a/packages/api/content/paths/html/001-common-elems/module.yml b/packages/api/content/paths/html/001-common-elems/module.yml new file mode 100644 index 00000000..f083903d --- /dev/null +++ b/packages/api/content/paths/html/001-common-elems/module.yml @@ -0,0 +1,4 @@ +id: html-intro +name: Introduction +type: lesson +icon: fire \ No newline at end of file diff --git a/packages/api/content/paths/html/001-common-elems/questions/story.md b/packages/api/content/paths/html/001-common-elems/questions/story.md new file mode 100644 index 00000000..7c63524f --- /dev/null +++ b/packages/api/content/paths/html/001-common-elems/questions/story.md @@ -0,0 +1,124 @@ +# Common HTML Tags + +Welcome back {{firstName}}! We have covered a lot in the last couple of lessons and things are starting to take shape with our Zine! + +Our Zine is starting to look really good! But lets dig deeper and see how we can futher organize our Zine and have our content really stand out. We are going to take a look at some of the commonly used HTML tags. + +# Span Tag + +In the last lesson, we looked at how to break up the content of our Zine into paragraphs using the Paragrah `
` tag. + +But what if we wanted to isolate a word or a group of words within the Paragraph? Let's take a look at an example, see the blue text in the example below? + +>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+ +We can isolate words or group of words by using the Span tag `` tag. + +Isn't this awesome? Let's take a look and see how it is used: + +```html +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+``` +Just like our Paragraph tag `` tag, the Span `` tag has an opening and closing tag. We just wrap our word or group of words within the opening and closing Span tags: + +```html +consectetur adipiscing elit +``` + +Looks simple, right? That's because it is! + +Now we can add some styling to make it stand out. + +# Strong Tag + +Want a word or group of words to REALLY stand out? How about we add some bold characters to really emphasize our text! + +Just like the Span `` tag, we can use a similar tag called the Strong `` tag. + +Let see what it looks like: +>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+ +Wow! That bold text really stands out. + +So how does the Strong `` tag work you ask? Well, the great news is it works just like the Span tag! Any word(s) within the opening and closing tags `` will show up bold. Let's look at the example below to see how we write the HTML code: + +```html +Lorem ipsum dolor sit amet, consectetur adipiscing elit +``` + +# Header Tag + +So now we have broken up our text into Paragraphs and we know how to isolate word(s) but how can we convey what our content is about? + +I know! We can add a title by using an HTML Header! + +The Header tag is used to represent the title of the page or content on the page. + +Let's give the content within our Paragraph tag a title: + +>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+ +That looks great! Now we know that the paragraph is about Lorum Ipsum. + +So, how do we add a header? I'll show you! + +Let's examine the HTML code below: + +```html +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+``` + +You can see we added a Header `` tag above our Paragraph tag. Any content within the opening and closing tags of the Header tag will be treated as a title. + +Usually the `` tag is reserved for the main title of the page. As a rule of thumb, only one `` tag should be used per page. + +If we want to emphasize other titles on our page, HTML gives us other options we can use. Let's take a look at how we can use different size titles through out our code: + +>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl nunc mi ipsum faucibus vitae aliquet. Egestas sed sed risus pretium quam vulputate. Ut diam quam nulla porttitor. Turpis egestas pretium aenean pharetra magna ac. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Id leo in vitae turpis massa sed elementum tempus. Cursus turpis massa tincidunt dui ut.
+>
+
+That's a good looking cupcake we got! Ok, let's take a look at the HTML code on how we added this image:
+
+```html
+
+```
+
+You maybe wondering what `src` and `alt` are within our Img tag? Well these are `Attributes`. All HTML tags or elements can have some `Attributes`, they provide some more information about our HTML tag. Think about our cupcakes example for a moment. If our HTML tag was a cupcake, we can use `Attributes` to convey what ingredients we are using and how much. `Attributes` usually come with a name and value and are always specified in the start tag. In our example above, the Img `