ul's or div's? and Rapping Wrappers
Mainly a web developer who works in HTML and CSS will work in HTML CSS, not HTML and CSS. Meaning that the pure HTML will look like a minefield of <div>’s or <ul>’s.
Before you finish your rant comment please hear me out.
If a tag is meant to fulfill a certain role you shouldn't use it for anything else right? Yes and no,… depends on how you look at it. Personally if there is a clear connection between two siblings in content or relationship <ul> maybe the more clear option.
Is it committed to only hold random stuff only for the reason that those arias are to be placed separate from say a search form, then
’s are the way to go.
Here’s a class to fend off automatic styling in <ul>'s
.ulToDiv {
list-style: none;
display: block;
padding: 0;
}
So when writing in your .inc.php or .html files think: is the pure HTML still legible and sane? Wrappers are handy BUT can define a shite webpage;
- Never wrap wrappers for the sake of rapping,
- The next CSS developer won’t like tag remixes.
The trio of how you can use wrappers;
- In separation of unrelated content.
- Wrapping the above to separate it from other content.
- Wrap direct content for looks.
Yes the last is a very grey one but in some cases must be used.