Hi everybody,
I’m still going through the basics found in the tutorials and now I’m learning about the blockquotes.
I know what a blockquote and citation are. But I’m just wondering why the following code given as an example doesn’t work when I type it on my text edit pages. It just shows up as a paragraph with indentation, no italics and no quotes. Here is the code:
<blockquote cite=“http://www.petermoore.net/sftb/chapter1.htm”>
<p>It didn’t take long for a daily routine to form: when they
left for work in the morning I’d still be in bed. And when
they came home they’d find me sitting on the sofa, drinking
beer and watching TV soaps.</p>
</blockquote>
I would like to know whether this code is good or not.
Thanks in advance.
Lila, That is how it’s meant to appear (just as a paragraph). Indentation, Italics and quotes are dependant on the browser to implement it (as it’s stylistic and each browser has their own defaults) therefore not all browsers will show the same effects you expect. When you move onto CSS you can ensure it looks the same in all browsers by adding the indents (padding-left), italics (text-style) and quotes (content or some background images carefully embedded)
Just because the cite element italicizes text by default does not mean blockquote will… every element has it’s own rules. And as far as I am aware, no browser uses italics on blockquote by default. Cite is inline within the paragraph so it makes sense to use italics to visibly offset the text, Blockquote affects everything within it, therefore it makes no sense to add the style to it… especially as it’s just a shell for the content to explain that it was contextually sourced.
No, you seem to be slightly confused here. Not all HTML code has stuff like italics or style applied to it, the fact you can’t see it making a difference doesn’t mean it isn’t doing anything. The code produces a blockquote, it essentially tells a web browser that everything held within it was cited from a website or sourced location. If you want style like italics to make it look different from other paragraphs of text, you use CSS, which is what the language is there for.
Alex, bear with me just a little So if I want to insert a quote in my xhtml code and I don’t know css, which code should I type so that I get the quote on my website?
Thank you so much for your patience. I wouldn’t have been that patient with myself:D)
To actually surround something in quotes without using CSS you have to actually include either " or " in your HTML.
Some browsers will insert quotes around elements identified inline with <q> or as a block with <blockquote> but others do not and so if you were to actually include the quotes around content inside such a tag you will end up with doubled up quotes in some browsers and if you don’t include them then they’ll only appear in some browsers.
To get the quotes to work consistently requires the use of CSS.
HTML is not supposed to define how something looks, it is only supposed to define what it is. To define how something looks on the screen, on paper, in braille, or how it is spoken etc rare what CSS is for.
I think CSS is more enjoyable than HTML (in many respects), it’s where all the stylistic and pretty stuff goes on, therefore it allows your creative side to go nuts
Lila, when I first taught Web design (to middle schoolers!), I started with nothing but HTML. Mistake. Now I teach it simultaneously. We don’t even start off with terms like “HTML” or “CSS,” but “structure” and “styling.” (They learn the terms within the first couple of lessons, but I like to start them with the concept.) They learn to add (very basic) styles to their (very basic) structure right off the bat. Alex is right, it’s the styling that really gets their attention. Same with the rest of us. We want to see right off the bat just what cool things we can do with all them multicolored pixel things.