I’ve been building the tribute page, and I’m using a ul for authors works.
Is ok to use the dd tag with in my ul tag or should I really use CSS to position the text. I had planned to link my CodePen but it won’t let me so I’ll just copy and paste part of the code.
<dd>Tomie Kawakami is a femme fatale with long black hair and a beauty mark
just under her left eye. She can seduce nearly any man, and drive them to
murder as well, even though the victim is often Tomie herself.
While one lover seeks to keep her for himself,
another grows terrified of the immortal succubus.</dd><br>
No, you can’t do that. A
<dd> tag is for use in a definiton list (a list of terms and their defintiions, like a dicitonary):
<dd>The description for the term</dd>
<dd>The description for the second term</dd>
<ul> is just an unordered list of stuff
You can’t mix in the other. In your example, if you have a list of characters with descriptions, then you can use a
Another thing, the only direct children allowed in a
<ol> element are
<li> items, and the only direct children allowed in
<dd> elements are
<dd> elements, so you can’t do
<li> (or dt/dl) elements are block level, so go to the full width anyway, the
<br> is redundant anyway. (And
<br> should be avoided as a rule, style should go in via CSS).
NOTE your markup will still generally work anywhere, because HTML parsers in browsers are designed to be very permissive: even if you write HTML that is wrong per the secifications, then the browser will try to render something sensible. This isn’t a great idea for a few reasons, but do bear it in mind._
I thought that was going to be the case but I wanted to check. I will also avoid using br from now on. Thank you.
I did use dl first of all but I wanted bullet points on the book titles, I tried using CSS to apply them but it wouldn’t work it.
You can use CSS’
::before property to add bullets, I’ll do a demo once I’ve got a sec
Never seen the :: before so gave a quick Google and came across this
It doesn’t quite put the text in the position that I wanted but I will have a little fiddle with it later see what I can workout.
Yep: you can treat that as an element, so any styling goes. This should work:
// Whatever value you want here,
// Just keep it the same for the ::before